Wednesday, January 2, 2019

Re: Itterate with Include Tag

Hi Shazia,
Can you post the included file?

On Saturday, December 29, 2018 at 11:51:29 PM UTC+1, Shazia Nusrat wrote:
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/b2056d0f-359f-4705-a81b-7be6dd3784e2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment