Saturday, December 29, 2018

Itterate with Include Tag

Hi Guys,

I have a form created from foreignkey model. I have used "include" with jinja for displaying my fields. But I don't know how to iterate through and include tag.
Below is the code and I would appreciate if someone can help me to iterate through following template code.

{% for field in form %}
{% include 'includes/form/form_fields.html' with form=field.myform %}
{% endfor %)
I can't get fields from the form. Please advise.
Looking forward to your feedback. :-)

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAD83tOy7tsenKtN8qNdP_0W1zn%2B%3DCM_4V-eguHoqP0K_f29A9Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment