acangiani / django-tagging

Automatically exported from code.google.com/p/django-tagging
Other
1 stars 0 forks source link

PATCH: allows ordering by count #97

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
This is a fairly simple addition that allows you to do the following:

{% tags_for_model products.Widget as widget_tags with counts asc %}
{% tags_for_model products.Widget as widget_tags with counts desc %}

Will you look at the patch? If its possible to give me a branch that you
can merge from go for it and you can test it some more. Thanks,

Andy.

Original issue reported on code.google.com by andrewph...@gmail.com on 9 Feb 2008 at 8:41

Attachments:

GoogleCodeExporter commented 9 years ago
Sorry for the bump, but you could also use django's own templatefilters to 
accomplish the same effect: 
widget_tags|dictsort:"count" or the same with dictsortreversed. the 
slice-filter also works as you'd expect, so in 
my opinion this is actually a cleaner solution. Maybe there's a lot of overhead 
this way though?

Wytse

Original comment by wytse.ka...@gmail.com on 4 Aug 2009 at 7:57