django template forloop

34 views
Skip to first unread message

luca72.b...@gmail.com

unread,
Oct 14, 2020, 10:51:57 AM10/14/20
to Django users
Hello 
I have this:
{% for x in lista_form %}
            {% if forloop.counter < 100 %}
            {% for fieldi in formone %}
                {{ fieldi.label }} {{ fieldi }}
                {% endfor %}
            Immagine <input type="file" name="{{ x }}" id="id_immagine">
             {% endif %}  
            {% if forloop.counter|divisibleby:"2" %}
            <br>
            {% endif %}

The second forloop is not executed, where i have to apply it?

Thanks

RANGA BHARATH JINKA

unread,
Oct 14, 2020, 11:06:42 AM10/14/20
to django...@googlegroups.com
Hi,

 You have to end for loop for second for loop

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/7a3e9bec-7e96-4922-ac0d-765ab49eb0d7n%40googlegroups.com.


--
Thanks and Regards

J. Ranga Bharath
cell: 9110334114

webmbackslash

unread,
Oct 14, 2020, 1:11:25 PM10/14/20
to django...@googlegroups.com
for field in formone not fieldi

Reply all
Reply to author
Forward
0 new messages