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

.net - C# List<T>.Find(x=>x.Rectangle.Contains(Point)) FAIL -

iphone - Smoothing a rounded stroke in Core Graphics -

c++ - QtQuick: QQmlApplicationEngine failed to load component qrc:/main.qml:23 Invalid attached object assignment -