Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Distinguish empty_forms with inline formsets #342

Open
sehmaschine opened this issue Jul 18, 2013 · 0 comments
Open

Distinguish empty_forms with inline formsets #342

sehmaschine opened this issue Jul 18, 2013 · 0 comments

Comments

@sehmaschine
Copy link

When looping through forms within an inline–formset, it currently looks like this:

{% for inline_form in formset %}
{% endfor %}

That does not allow to separate between forms and empty_forms (which is needed if you want to hide the empty_form without using hacks). We currently use something like {% if forloop.last %} ... add container and hide contents ... {% endfor %} which obviously is not a nice solution.

Therefor, I propose this:

{% for inline_form in formset.forms %}
{% endfor %}
{{ formset.empty_forms }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant