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. ``badge_count`` --------------- 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 %} ``badges_for_user`` ------------------- 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` instances. .. sourcecode:: html+django {% badges_for_user user as badges %}