2👍
Interactive debugger in django-extensions runserver_plus
command will make it easier to introspect template node content and template source, as well as look into context variables.
Other than that, be sure that templatetag is importable and do not raise an errors.
Unfortunately, I do not any easier way than that.
2👍
Good question,you could check error traceback again:
- The highlighted template line is the start of the node inside which the broken code resides. I call the node the parent node
- The last but two item in the tracestack is the key to find the error. Check variables inside its Local vars
- ‘nodelist’ — the list of nodes before the error, inside the parent node.
- ‘compiled_result’ — if there is one, is the last complete node (not including TextNode) before the error
For example, template which looks like
{% block foo %}{{ "{% }}
raises a error tracestack, the ‘nodelist’ inside the last but two item could be
nodelist []
Which means the error is around the first child-node of the block foo.
- [Django]-Django model class decorator
- [Django]-Filter JSON field django with greater than, less than and a range using _contains
- [Django]-Django Translation on Heroku is not fully working
0👍
Don’t think it tells you the exact location but Django Debug Toolbar should help here to some extent.
https://github.com/django-debug-toolbar/django-debug-toolbar
a tour http://vimeo.com/6640136
- [Django]-Django access logged in user in custom manager
- [Django]-TemplateSyntaxError while uploading image using Django Admin