diff --git a/templates/helpdesk/base.html b/templates/helpdesk/base.html index 6b8a2a13..5516236a 100644 --- a/templates/helpdesk/base.html +++ b/templates/helpdesk/base.html @@ -28,7 +28,7 @@ {% block helpdesk_body %}{% endblock %} {% include "helpdesk/debug.html" %} diff --git a/templatetags/svn_revision.py b/templatetags/svn_revision.py new file mode 100644 index 00000000..2af5308b --- /dev/null +++ b/templatetags/svn_revision.py @@ -0,0 +1,16 @@ +from django import template +from django.utils.version import get_svn_revision +import helpdesk + +def svn_revision(parser, token): + path = helpdesk.__path__[0] + return SVNRevisionNode(path) + +class SVNRevisionNode(template.Node): + def __init__(self, path): + self.path = path + def render(self, context): + return get_svn_revision(self.path) + +register = template.Library() +register.tag('helpdesk_svn_revision', svn_revision)