djangosnippets.org: Latest snippets tagged with 'django-tagging'https://djangosnippets.org/tags/django-tagging/2010-12-22T02:29:46.505154-06:00View to retrieve objects meeting a complex tag query
2010-12-22T02:29:46.505154-06:00nathangeffenhttps://djangosnippets.org/snippets/2297/<p>This view parses complex tag queries. It generates a list of model instances matching an expression of tags. The expression currently supports intersection, union and subtraction. Expressions can also be put in parenthesis and then combined with other expressions.
</p>
<p>The expression must be passed to this view in the tag_expression …</p>
Freely redistributableTaggedManager and TaggedQuerySet with chainable tagged() methods implemented with django-tagging
2010-02-25T03:21:06.838058-06:00fish2000https://djangosnippets.org/snippets/1942/<p>The popular <a href="http://code.google.com/p/django-tagging/">django-tagging</a> app has, in its implementation and semantics, a highly usable and transparent elegance -- but then you have to call methods on a Tag instances' items collection. These classes let you inline the tag name in the chain of queryset filter methods instead.</p>
<p>TO USE:</p>
<pre><code>### models.py …</code></pre>
Freely redistributablegetting the related entries with a templatetag using django-tagging
2009-02-15T15:19:17.339967-06:00Vhttps://djangosnippets.org/snippets/1325/<p>Django tagging by default doesn't provide a templatetag to get the related objects for another object. Even though this is implemented as a model. Still, one can use the existing templatetags to achieve the same outcome.</p>
<p>Of course, writing a custom templatetag would be more efficient in terms of database …</p>
Freely redistributable