0

Hello I have to make something like this

<div class='grid'>    
   <div class='width-one-third'>
      <li></li>
      <li></li>
   </div>
   <div class='width-one-third'>
      <li></li>
      <li></li>
   </div>
   <div class='width-one-third'>
      <li></li>
      <li></li>
   </div>
</div>

Here All those items on is from a table. So Here I need to run First loop for total items and each nested for 2 time. How can I in Django template?

This shoes me nested loop is possible: Nested loop in Django template

Community
  • 1
  • 1
Sagar Devkota
  • 1,295
  • 3
  • 12
  • 25
  • 1
    and what have you tried? – alfonso.kim Apr 06 '17 at 16:27
  • I Tried By passing a binding of {'n' : range(n) } to the template, then {% for i in n %}
      {% for blogs in blogs %}
    1. {% endfor %}
    {% endfor %} But no worked it Run the same post again and again
    – Sagar Devkota Apr 06 '17 at 16:50
  • Good. I hope that you had found your solution by explaining what you have tried – alfonso.kim Apr 06 '17 at 18:13
  • It did not solve my exact Problem. And The Problem was In e very
  • I need to get the Items from one table. Through The above Code I get the same
  • items on Every Inner Div. Is there any way to solve this?
  • – Sagar Devkota Apr 07 '17 at 01:31