Force lowercase in Django-Taggit
I've just finished migrating my site's tagging system from django-
tagging to django-taggit. Wrote up some notes on the migration process
in case useful to anyone else:
http://birdhouse.org/blog/2011/04/17/migrate-django-tagging-taggit/
But I still have two questions outstanding:
1) Unlike django-tagging, taggit does not have a global option to
force lowercase tags. This means users can create both tags "Music"
and "music" and both go into the system as separate taxonomies (one
with slug music_1), which is confusing for users. I can't even think
of a use case for this, and would expect reasonable defaults to try
and limit tag redundancy, but ah well.
2) The tag cloud display provided by the separate taggit-template-tags
app doesn't provide a way to only display tags in a cloud that have
been used some minimum number of times. The only solution I could come
up with was to check for num_times during the iteration:
{% if tag.num_times > 5 %}
...
{% endif %}
This is horribly inefficient and I've papered over it with caching for
now, but would really like to come up with a better way.
Has anyone encountered/dealt with either of these issues? Ideally
without hacking the apps themselves, but I'll do what needs doing.
Thanks.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home