Opened 9 years ago

Closed 9 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
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: UI/UX:

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)

admin_form_defaults_via_GET.patch (882 bytes) - added by plisk 9 years ago.

Download all attachments as: .zip

Change History (2)

Changed 9 years ago by plisk

comment:1 Changed 9 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

(In [1758]) Fixed #1092 -- Fixed behavior for query-string overrides in admin forms

Note: See TracTickets for help on using tickets.
Back to Top