Opened 11 years ago

Closed 10 years ago

#3737 closed (wontfix)

Admin Interface Add forms should use the filtering from the changelist to set default values for fields

Reported by: lakin@… Owned by: nobody
Component: contrib.admin Version: master
Severity: Keywords:
Cc: lakin@… Triage Stage: Design decision needed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


When the user clicks "Add" while viewing a changelist that has been filtered in some manner, any editable fields that are specified in the filtering should default to the filtering value. (If the users is restricting the change list in some manner, it's likely they're only dealing with objects of that type.)

This is a convenience feature but is nice to have. See the (soon to be) attached patch for an initial implementation. I'd like to get some feedback on the patch because I'm unsure of my implementation of the get_add_query_string.

Attachments (1)

auto_populate_fields_from_filters.patch (1.9 KB) - added by lakin@… 11 years ago.
Auto populate fields in the add form based on filter query string.

Download all attachments as: .zip

Change History (4)

Changed 11 years ago by lakin@…

Auto populate fields in the add form based on filter query string.

comment:1 Changed 11 years ago by James Bennett

I have a feeling that this won't be picked up because there's already a refactoring of the admin interface going on (see the newforms-admin branch in SVN); once it's completed, it will be much easier to write your own customizations to get specific behavior you want.

comment:2 Changed 10 years ago by Jacob

Triage Stage: UnreviewedDesign decision needed

comment:3 Changed 10 years ago by Luke Plant

Resolution: wontfix
Status: newclosed

One problem: it is only likely that the person will want those fields filled in. If, for instance, they have been doing something else then come back to the list and press 'Add', it may be confusing/dangerous if some fields are already filled in. Personally, I can think of some other instances when I wouldn't want this at all.

Also, there is the problem of how this might interact with other ways of setting default values, and there is ubernostrum's point that it should hopefully soon be easier to add customisations like this. I suspect it is already possible to do via some javascript (using window.history ?).

So, closing as WONTFIX.

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