Django colon syntax in template tags: only in newer versions?

Posted by Alan on Stack Overflow See other posts from Stack Overflow or by Alan
Published on 2010-06-14T19:42:45Z Indexed on 2010/06/14 20:12 UTC
Read the original article Hit count: 233

Filed under:
|

I just deployed an application to a new server, and although I'm using virtualenv, I had to install a new environment on the production server, which has a different architecture.

Anyway, I received no TemplateSytaxErrors in development, but on the production server, I get:

Exception Type:     TemplateSyntaxError
Exception Value:    Caught SyntaxError while rendering: invalid syntax (views.py, line 25)

The offending line is:

{% url admin:password_change as password_change_url %}

Upon removing that line, the TemplateSyntaxError hops to the next line that has a colon in it (and lets other template tags work fine).

So my question is this: is there some discrepancy in versions of Python/Django that would allow or disallow the namespacing syntax?

The template tags are in django-grappelli (http://code.google.com/p/django-grappelli/), so I'd rather not go through their code and rewrite all the template tags.

Development server:

  • 32-bit Debian
  • Python 2.5.5
  • Django 1.2.1

Production server:

  • 64-bit CentOS
  • Python 2.4.3
  • Django 1.2.1

Any ideas?

© Stack Overflow or respective owner

Related posts about python

Related posts about django