Opened 6 years ago

Last modified 4 years ago

#11651 new New feature

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

Reported by: adamv 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 adamv 6 years ago.
customize_list_editable2.diff (3.1 KB) - added by adamv 6 years ago.
Now with docs.
customize_list_editable3.diff (3.2 KB) - added by adamv 5 years ago.
Rebased patch on Django 1.2.
customize_list_editable4.diff (7.6 KB) - added by adamv 5 years ago.
Patch with docs and tests, against 1.2.1

Download all attachments as: .zip

Change History (12)

Changed 6 years ago by adamv

comment:1 Changed 6 years ago by Alex

  • Needs documentation set
  • Needs tests set
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

Changed 6 years ago by adamv

Now with docs.

Changed 5 years ago by adamv

Rebased patch on Django 1.2.

comment:2 Changed 5 years ago by adamv

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

Changed 5 years ago by adamv

Patch with docs and tests, against 1.2.1

comment:3 Changed 5 years ago by adamv

  • Needs documentation unset
  • Needs tests unset

comment:4 Changed 5 years ago by anonymous

  • Cc andy@… added

comment:5 Changed 4 years ago by julien

  • Severity set to Normal
  • Type set to New feature

comment:6 Changed 4 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 4 years ago by julien

  • UI/UX unset

See related issue in #11732.

comment:8 Changed 4 years ago by julien

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