Which version of django are you running ?

The in operator in the if statement only works in the development version of 
django not with 1.1 or 1.0 series. (see warning on top of the page)


Frédéric Burlet.

On Saturday 09 January 2010 21:22:28 kotpierdzibonk wrote:
> Hi,
> 
> I copied the below code from the django documentation (http://
> docs.djangoproject.com/en/dev/ref/templates/builtins/), tried it out,
> and it is not working for me. Can anyone think of a reason why?
> 
> {% if "bc" in "abcdef" %}
>   This appears since "bc" is a substring of "abcdef"
> {% endif %}
> 
> 
> I get the following error:
> 
> Exception Type:       TemplateSyntaxError
> Exception Value:      'if' statement improperly formatted
> Exception Location:   .../django/template/defaulttags.py in do_if, line
> 822
> Python Executable:    /usr/bin/python2.5
> Python Version:       2.5.4
> 
> 
> Django version 1.1.1
> 

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to