nephila / djangocms-blog

django CMS blog application - Support for multilingual posts, placeholders, social network meta tags and configurable apphooks
https://djangocms-blog.readthedocs.io
BSD 3-Clause "New" or "Revised" License
391 stars 192 forks source link

Add an option to disable unicode in slugs #707

Closed corentinbettiol closed 1 year ago

corentinbettiol commented 1 year ago

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!