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


I have posted an application on a new server, and although I am using VirtualAv, I have a new environment The production server was installed, which has a different architecture. Anyway, I have not found any TemplateSytaxErrors in development, but on the production server, I get:

  exception type: TemplateSyntaxError exception value: caught Syntax error Time: Invalid syntax (views.py, line 25)  

Abusive line is:

  {% url administrator: password_change as Password_change_url%}  

On removing that row, TemplateSyntaxError goes to the next line in which there is a colon (and to other template tags) Hires).

My question is: Are there any discrepancies in the versions of Python / Django that will allow or deny the namespace of namespace?

The template tags are in Dinggo-Grapeili (), so I do not want to go through it, rewrite their code and 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 < / Li>
  • Django 1.2.1

Any ideas?

On closer inspection, I realized that it was not a derogatory row, even if it was highlighted in traceback Gone:

password_change_url%} as password_change

This line was actually in my views.py, where I did the ternary Operator was used ( "this" if the condition is "is" ). I did not know that this syntax is only supported in Python 2.5 and above.

The problem is resolved.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -