[newforms-admin] Initial form data passed from request.GET isn't handled correctly by the admin
|Reported by:||Owned by:||nobody|
|Severity:||Keywords:||nfa, newforms, admin|
|Cc:||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
The admin interface used to pass initial data from the URL to the forms, so calling for example:
Would result in the "username" field to be prefilled with "foo".
This is broken in recent newforms-admin because the MultiValueDict (QueryDict) is used to extend an ordinary dict in django.newforms.forms.
The way to resolve this problem is to "flatten" the MultiValueDict to an ordinary dictionary, before passing it to the ModelForm.
Thanks to brosner on #django for the help! (basically fixing it ;)
Change History (5)
comment:1 Changed 9 years ago by
|Patch needs improvement:||unset|
|Status:||new → closed|