Revision history [back]
cannot add templatetags
I have created a new template "mytemplate.html" extending "two_column_body.html". It was working until I try to use custom tags. I have created the file askbot/templatetags/mytags.py containing for instance :
@register.simple_tag
def mytag():
...
In "mytemplate.html" I add :
...
{% load mytags %}
<label>{% mytag %}</label>
...
and I get this messages in the logs :
/usr/local/virtualenv/askbot/lib/python2.6/site-packages/askbot/middleware/pagesize.py TIME: 2011-08-10 14:31:34,457 MSG: pagesize.py:process_exception:44 <class 'jinja2.exceptions.TemplateSyntaxError'>
/usr/local/virtualenv/askbot/lib/python2.6/site-packages/askbot/middleware/pagesize.py TIME: 2011-08-10 14:31:34,457 MSG: pagesize.py:process_exception:45 Encountered unknown tag 'mytag'. Jinja was looking for the following tags: 'endblock'. The innermost block that needs to be closed is 'block'.
Any idea?