Thursday, September 30, 2010

Re: template syntax errors in production admin site (version problem?)

On Thu, Sep 30, 2010 at 12:39 PM, bobbymanuel <> wrote:
PROBLEM SOLVED:  upgrade to Python 2.7 on server resolved issue.
Apparrently Django 1.2.3 is not fully compatible with Python 2.5

I suspect it is your application code, not Django 1.2.3, that is not compatible with Python 2.5. The error you mentioned above was:

TemplateSyntaxError at /admin/
In template /usr/lib/python2.5/site-packages/django/contrib/admin/templates/admin/base.html, error at line 31
Caught SyntaxError while rendering: invalid syntax (, line 52)

This is saying that line 52 of a file is where the Python syntax error was encountered.My guess is you have some code on line 52 in some file in your project that uses Python syntax that was not allowed in Python 2.5.

Why was that line even getting referenced from an attempt to load /admin/? Line 31 of the admin/base.html template is:

31                      {% url django-admindocs-docroot as docsroot %}

This {% url %} tag (any {% url %} tag) will cause all of your project's url patterns to get loaded, which will often lead to importing your project's view code.


You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment