I added tags = TaggableManager(blank=True) to my models, but I want my tags to be case-insensitive. I saw some snippets of work arounds for this and wanted to ask if there is an easy way to do it? If I have to override some methods from the TaggableManager, please advise how can I do that?
Thanks in advance, Arshavski Alexander.
Recent versions of django-taggit support a
TAGGIT_CASE_INSENSITIVE
setting, that should behave the way you're describing.I am sure you have figured out solution by now :) Though I will put the answer as someone might hit this while searching -
Use https://github.com/shacker/django-taggit version of django-taggit.
It allows to configure TAGGIT_FORCE_LOWERCASE = True
It also allows you to filter stop words.
I have used this snippet for a similar issue. A copy of the code (reprinted for posterity):
Basically, you override the initial queryset so that all querysets take case insensitivity into account.