Opened 15 years ago

Last modified 13 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: dev
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 15 years ago.
customize_list_editable2.diff (3.1 KB ) - added by Adam Vandenberg 15 years ago.
Now with docs.
customize_list_editable3.diff (3.2 KB ) - added by Adam Vandenberg 14 years ago.
Rebased patch on Django 1.2.
customize_list_editable4.diff (7.6 KB ) - added by Adam Vandenberg 14 years ago.
Patch with docs and tests, against 1.2.1

Download all attachments as: .zip

Change History (12)

by Adam Vandenberg, 15 years ago

comment:1 by Alex Gaynor, 15 years ago

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

by Adam Vandenberg, 15 years ago

Now with docs.

by Adam Vandenberg, 14 years ago

Rebased patch on Django 1.2.

comment:2 by Adam Vandenberg, 14 years ago

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

by Adam Vandenberg, 14 years ago

Patch with docs and tests, against 1.2.1

comment:3 by Adam Vandenberg, 14 years ago

Needs documentation: unset
Needs tests: unset

comment:4 by anonymous, 14 years ago

Cc: andy@… added

comment:5 by Julien Phalip, 13 years ago

Severity: Normal
Type: New feature

comment:6 by patchhammer, 13 years ago

Easy pickings: unset
Patch needs improvement: set

customize_list_editable4.diff fails to apply cleanly on to trunk

comment:7 by Julien Phalip, 13 years ago

UI/UX: unset

See related issue in #11732.

comment:8 by Julien Phalip, 13 years ago

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