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
Need settings option FORCE_LOWERCASE_TAGS #70
Comments
In case anyone else needs this, I've created a fork https://github.com/shacker/django-taggit with two new options: TAGGIT_FORCE_LOWERCASE The latter is defined as a list in settings - any bare words in that list (of, the, for, to, etc.) will be removed from the tag set. I'm no Alex Gaynor, but it seems to work :) |
+1 for these features. |
would like to have these options too. |
+100. :P Or make FooBar == foobar, and not foobar == foobar, and FooBar == foobar_1. :( |
I don't think it makes sense to have tags which differ only in case. It's not even possible on MySQL because it violates the unique constraint on tag name: IntegrityError: (1062, "Duplicate entry 'LONDON' for key 'taggit_tag_name_6b48d50f_uniq'") This PR adds a new setting, `TAGGIT_CASE_INSENSITIVE`, which causes existing tags to be looked up case insensitively. New tags are added with the supplied case, which will be used from then on. The default behaviour is the same as before without this setting. This meets nookiepl's request on jazzband#70, and my comment on jazzband#9.
Case insensitive tags was added in #325 and is available in the latest version of taggit (0.16.0) |
Slugs are lowercased by being passed through slugify, but tag names are not. Thus some users can enter "Music" and others enter "music" - these are functionally identical, but taggit creates two tags "music" and "music_1", and tag listings and clouds of course show both versions, which is confusing.
Django-tagging has a global settings option to force all lowercase tags and I'd love to see the same in Taggit.
The text was updated successfully, but these errors were encountered: