python - How to call an element which I need in django massive? -


i have such code

{% x in list %}                 <div class="col-md-4">                     <h3>{{ x.title }}</h3>                     <span>{{ x.category }}</span>                 </div> {% endfor %} 

i need element massive in different divs. example

{% x in list %}                 <div class="col-md-4">                     <h3>{{ 3.title }}</h3>                     <span>{{ 1.category }}</span>                 </div>                 <div class="col-md-6">                     <h3>{{ 4.title }}</h3>                     <span>{{ 3.category }}</span>                 </div> {% endfor %} 

i need such grid in 1 loop how can it?

http://blog.eney.solutions/wp-content/uploads/sites/3/2014/12/737781.png1

look @ variables , lookups (django docs) .

i think can try this:

{{ list[0].title }}  

Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -