Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Tree: fdeb3f488d
Fetching contributors…

Cannot retrieve contributors at this time

36 lines (22 sloc) 971 Bytes
Templatetags in ``brabeion``
.. module:: brabeion.templatetags.brabeion_tags
``brabeion`` offers a number of templatetags for your convenience, which are
available in the ``brabeion_tags`` library.
This tag returns the number of badges that have been awarded to this user, it
can either set a value in context, or simple display the count. To display the count its syntax is:
.. sourcecode:: html+django
{% badge_count user %}
To get the count as a template variable:
.. sourcecode:: html+django
{% badge_count user as badges %}
This tag provides a ``QuerySet`` of all of a user's badges, ordered by when
they were awarded, descending, and makes them available as a template variable.
The ``QuerySet`` is composed of :class:`~brabeion.models.BadgeAwarded`
.. sourcecode:: html+django
{% badges_for_user user as badges %}
Jump to Line
Something went wrong with that request. Please try again.