#26018: FormMixin.get_context_data calls get_form improperly after form_invalid
-------------------------------------+-------------------------------------
Reporter: chmarr | Owner: chmarr
Type: Bug | Status: closed
Component: Generic views | Version: 1.9
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"e429c5186ceed81c4627165518e0c70c58e69595" e429c51]:
{{{
#!CommitTicketReference repository=""
revision="e429c5186ceed81c4627165518e0c70c58e69595"
Fixed #26018 -- Prevented unecessary get_form() call in
FormMixin.get_context_data().
Changed "dict.setdefault" to "if x in dict" pattern so that get_form()
would not
be called unnecessarily, specifically in the case where
FormMixin.form_invalid()
calls get_context_data() with the current form.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26018#comment:5>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/064.42f48d2957d6c653e3b1fcb3955c6810%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.