python - Django templates condition check -


All,

We can not do the following in templates

{% If subject.id == selected_id%}

and we also can not specify the variable {{selected = "selected"}}

thanks ........

This comparison will work in Django 1.2. 1.1 You have to use it:

  {% ifequal subject.id select_id%}  

You can use for variable assignments.

  {% selected as 'selected'%} {% endwith%}  

is not selected, do not hesitate to read it It has not hurt.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -