Opened 19 years ago
Closed 19 years ago
#1092 closed defect (fixed)
[patch] Fix set fields defaults in admin forms on adding from GET params
Reported by: | plisk | Owned by: | Adrian Holovaty |
---|---|---|---|
Component: | contrib.admin | Version: | |
Severity: | normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Because of request.GET is an QueryDict object it returns list even for param with only 1 value, like if you pass to your add form ...my_object/add/?name=Foo you'll see Foo in the Name field. This patch fixes this behaviour to correctly set fields defaults so Foo is Foo, not Foo on the forms. Preselect of fields with ForeignKey should also start to work.
Attachments (1)
Change History (2)
by , 19 years ago
Attachment: | admin_form_defaults_via_GET.patch added |
---|
comment:1 by , 19 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
(In [1758]) Fixed #1092 -- Fixed behavior for query-string overrides in admin forms