Opened 7 years ago

Last modified 5 years ago

#11651 new New feature

Allow list_editable form fields to be customized separately from changeform fields.

Reported by: Adam Vandenberg Owned by: nobody
Component: contrib.admin Version: master
Severity: Normal Keywords:
Cc: andy@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: yes

Description

Form fields used by list_editable in the admin can be customized by overriding the formfield_for_dbfield method on a ModelAdmin.
Somtimes, though, you want to use a different customized field in the main and list edit screens. For instance, you might want to shrink down the size of certain fields in the list view, but not on the main view.

This patch adds methods to allow the list_editable form fields to be customized independently.

Very brief discussion on django-users: http://groups.google.com/group/django-users/browse_thread/thread/47c11b346f472ddf/72b9aa9a0b92ad6a#72b9aa9a0b92ad6a

Attachments (4)

customize_list_editable.diff (1.6 KB) - added by Adam Vandenberg 7 years ago.
customize_list_editable2.diff (3.1 KB) - added by Adam Vandenberg 7 years ago.
Now with docs.
customize_list_editable3.diff (3.2 KB) - added by Adam Vandenberg 7 years ago.
Rebased patch on Django 1.2.
customize_list_editable4.diff (7.6 KB) - added by Adam Vandenberg 7 years ago.
Patch with docs and tests, against 1.2.1

Download all attachments as: .zip

Change History (12)

Changed 7 years ago by Adam Vandenberg

comment:1 Changed 7 years ago by Alex Gaynor

Needs documentation: set
Needs tests: set
Triage Stage: UnreviewedAccepted

Changed 7 years ago by Adam Vandenberg

Now with docs.

Changed 7 years ago by Adam Vandenberg

Rebased patch on Django 1.2.

comment:2 Changed 7 years ago by Adam Vandenberg

Where would be a good place to cram in some tests for this? admin_views? admin_changelist? Or a new folder?

Changed 7 years ago by Adam Vandenberg

Patch with docs and tests, against 1.2.1

comment:3 Changed 7 years ago by Adam Vandenberg

Needs documentation: unset
Needs tests: unset

comment:4 Changed 6 years ago by anonymous

Cc: andy@… added

comment:5 Changed 6 years ago by Julien Phalip

Severity: Normal
Type: New feature

comment:6 Changed 6 years ago by patchhammer

Easy pickings: unset
Patch needs improvement: set

customize_list_editable4.diff fails to apply cleanly on to trunk

comment:7 Changed 5 years ago by Julien Phalip

UI/UX: unset

See related issue in #11732.

comment:8 Changed 5 years ago by Julien Phalip

UI/UX: set
Note: See TracTickets for help on using tickets.
Back to Top