Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option to disable unicode in slugs #707

Closed
corentinbettiol opened this issue Aug 5, 2022 · 0 comments · Fixed by #727
Closed

Add an option to disable unicode in slugs #707

corentinbettiol opened this issue Aug 5, 2022 · 0 comments · Fixed by #727

Comments

@corentinbettiol
Copy link
Contributor

corentinbettiol commented Aug 5, 2022

Description

Some people may not want to have unicode chars like ù or ö in their slugs. Adding an (optional) setting would help.

Use cases

Let slugs be auto-generated like before, but replace all unicode chars by ascii-ones (like django does when there's no allow_unicode=True).

Proposed solution

Update this line, try to get a setting DJANGOCMS_BLOG_UNICODE_SLUG (default = True, if it does not exist = True), and pass this value to allow_unicode.

Alternatives

Another way to do that is to manually edit the slug.

Additional information

Will create a PR soon.

edit: added a pr!

corentinbettiol added a commit to kapt-labs/djangocms-blog that referenced this issue Aug 8, 2022
Default is still allow_unicode=True, add "BLOG_UNICODE_SLUGS" setting.

Relative to nephila#707.

Update black version in .pre-commit-config.yaml.
yakky pushed a commit that referenced this issue Apr 20, 2023
Default is still allow_unicode=True, add "BLOG_UNICODE_SLUGS" setting.

Fix #707.
yakky added a commit that referenced this issue Apr 20, 2023
Default is still allow_unicode=True, add "BLOG_UNICODE_SLUGS" setting.

Fix #707.

Co-authored-by: Corentin Bettiol <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant