#12780: Provide a hook for compound form/formset validation in ModelAdmin
-------------------------------------------+--------------------------------
Reporter: mrts | Owner: nobody
Status: new | Milestone:
Component: django.contrib.admin | Version: SVN
Resolution: | Keywords:
Stage: Accepted | Has_patch: 1
Needs_docs: 0 | Needs_tests: 1
Needs_better_patch: 0 |
-------------------------------------------+--------------------------------
Comment (by mrts):
Replying to [comment:3 russellm]:
> Patch needs tests.
Will be done.
> * For consistency with other parts of Django (e.g.,
inlineformset_factory), I'd say the argument order should be request,
new_object, form, formset
Agreed, will be done.
> * Is there a reason that form_validated is required as an argument? I
can understand the "provide everything just in case" approach, but given
that if form_validated=False, it doesn't matter what you return from
formsets_are_valid, it doesn't make much sense to me to pass it in as an
argument. Am I missing something?
One may decide to avoid any formset processing if the form is not valid.
The example at http://gist.github.com/296411 is not my use case so I can't
comment on the actual requirements. but e.g. it may be useful to check `if
form_is_valid` before validating base language/is approved. Feel free to
disagree though.
--
Ticket URL: <http://code.djangoproject.com/ticket/12780#comment:4>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.