Thanks for the code paste.
You mean in your views, the formset.is_valid() returns False
and so does not delete your form tagged to delete?
I don't quite understand where exactly is the problem?
On 03/27/2015 12:17 AM, Neto wrote:
When I mark to delete the formset, django requires complete all
fields, he does not ignore the marked form to delete. How do I solve
this? I wanna that django delete the form marked or ignore him.
from django.forms.formsets import formset_factory
>>>from myapp.forms import ArticleForm
>>>ArticleFormSet = formset_factory(ArticleForm, can_delete=True, min_num=1,
extra=0)
<form method="post" action="">
{{ formset.management_form }}
{% for form in formset %}
<ul>
<li>{{ form.title }}</li>
<li>{{ form.pub_date }}</li>
{% if formset.can_delete %}
<li>{{ form.DELETE }}</li>
{% endif %}
</ul>
{% endfor %}
</form>
--
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+unsubscr...@googlegroups.com
<mailto:django-users+unsubscr...@googlegroups.com>.
To post to this group, send email to django-users@googlegroups.com
<mailto:django-users@googlegroups.com>.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/7ecb3486-818c-4051-84e2-168b506b5c10%40googlegroups.com
<https://groups.google.com/d/msgid/django-users/7ecb3486-818c-4051-84e2-168b506b5c10%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.
--
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/55151F97.8020400%40arkade.info.
For more options, visit https://groups.google.com/d/optout.