开发者

Django markup templatetags error

I am getting the following errors in a django app:

TemplateSyntaxError at /
'markup' is not a valid tag library: Template library markup not 开发者_开发知识库found, tried django.templatetags.markup,django.contrib.admin.templatetags.markup

I have tried to following the solutions form this website which suggests that that 'django.contrib.markup' is missing from the INSTALLED_APPS list, but I already have it there.

I can import markdown from python manage.py shell so it is installed and is in the path.

I am using Django 1.3.

Here is the template:

{% load markup %}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
...

I just tried it again, and it works. Odd. I tried restarting the server before submitting the question, but I am not sure what is different now.


Try calling render_to_response from python manage.py shell on the template in question, and please give a clip of the template file in question.

Fixed itself? Spooky. I hate those "fixes" because there's no guarantee that it won't break again or that the same "fix" will work again.

The only things I can think of there are:

  • Something had the old version cached
  • There was an old .pyc file laying around
  • Your server was trying to be clever
  • WSGI didn't reload the code or templates after you changed it
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜