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.
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/7ecb3486-818c-4051-84e2-168b506b5c10%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to