Thanks for the tip, this works fine indeed.
-- I expected it to be some option on the formset, but this is ok as well.
On Saturday, January 28, 2017 at 8:55:59 PM UTC+1, Grzegorz Tężycki wrote:
On Saturday, January 28, 2017 at 8:55:59 PM UTC+1, Grzegorz Tężycki wrote:
How you render your formset.
You can add separator in your html template:
example:
{% for form in formset.forms %}
{{ form.as_p }}
{% if not forloop.last %}
<hr/>
{% endif %}
{% endfor %}
W dniu sobota, 28 stycznia 2017 15:08:00 UTC+1 użytkownik Jeroen van Oorschot napisał:Hi,I'm using a
modelformset_factory()
for displaying a form multiple times automatically. This works perfect.I would like to have some kind of separator between the individual forms in the page. Now the formsetfactory just shows all forms after eachother, and it can be quite hard too see which input belongs to which form.Does anyone have an idea how to make this? If not, i'd like to request it as a feature on the formset_factory.Kind regards,
Jeroen
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/8bc84225-9c6e-4b8b-b384-45c1bc73716a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment