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 case-insensitive option for tag names. #263

Closed
wants to merge 1 commit into from

Conversation

qris
Copy link

@qris qris commented Sep 15, 2014

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 #70, and my comment on #9.

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.
@buddylindsey
Copy link

+100000000000 We just hit this issue. :(

@buddylindsey
Copy link

Just circling back. This looks like one of the better solutions for this, but it looks like a lot of people are hitting this issue all these PR's are trying to solve the same problem.
#98 #220 #263 #270 #274

@ivancrneto
Copy link

+1 for this, I tried to solve the problem in another PR but this solution is much better

@frewsxcv
Copy link
Collaborator

@qris Can you fix the merge conflicts here? I can merge afterwards

@mfeliu
Copy link
Contributor

mfeliu commented Jul 3, 2015

Hi, I have fixed the merged conflicts in another pull request: #325

Could you merge it please?

@frewsxcv
Copy link
Collaborator

frewsxcv commented Jul 4, 2015

Case insensitive tags was added in #325 and is available in the latest version of taggit (0.16.0)

@frewsxcv frewsxcv closed this Jul 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants