Searching multiple fields in Django for loop -


i have couple form fields need format differently , trying use if statement find fields when rendered, doesn't seem working documentation suggests.

i want format "country" , "state" differently, code doesn't i'm trying.

            {% field in customerfields %}                  {% if field.name != 'country' or 'state' %}                     {{ field.label.upper }}                     <div class="formrow">                         {{ field }}                     </div>                 {% else %}                     <div class="formrow">                         <div class="styledselect">                             {{ field }}                         </div>                     </div>                 {% endif%}              {% endfor %} 

how search more 1 field? there better way this?


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -