Opened 7 years ago

Closed 6 years ago

#11882 closed (fixed)

Documentation missing for django.contrib.admin.ModelAdmin.formfield_for_manytomany

Reported by: Nils L Owned by: anonymous
Component: Documentation Version: 1.1
Severity: Keywords: formfield_for_manytomany, admin
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

The documentation only describes the formfield_for_foreignkey method, but not the formfield_for_manytomany method of ModelAdmin.

See en/dev/ref/contrib/admin/. It would be good with some mention of the formfield_for_manytomany method there.

Attachments (3)

11822.diff (1.1 KB) - added by Rob Hudson <treborhudson@…> 7 years ago.
11882.diff (1.4 KB) - added by Tim Graham 7 years ago.
small edits to existing patch
formfield_for_docs.diff (1.7 KB) - added by Simon Meers 7 years ago.
Updated documentation to fix buggy example code

Download all attachments as: .zip

Change History (9)

comment:1 Changed 7 years ago by Rob Hudson <treborhudson@…>

Owner: changed from nobody to anonymous
Status: newassigned
Triage Stage: UnreviewedAccepted

Changed 7 years ago by Rob Hudson <treborhudson@…>

Attachment: 11822.diff added

comment:2 Changed 7 years ago by Rob Hudson <treborhudson@…>

Has patch: set

Changed 7 years ago by Tim Graham

Attachment: 11882.diff added

small edits to existing patch

comment:3 Changed 7 years ago by Tim Graham

Triage Stage: AcceptedReady for checkin

Changed 7 years ago by Simon Meers

Attachment: formfield_for_docs.diff added

Updated documentation to fix buggy example code

comment:4 Changed 7 years ago by Simon Meers

Resolution: fixed
Status: assignedclosed

I found a "bug" in the example code for both formfield_for_foreignkey and formfield_for_manytomany -- see updated patch. Best to let the super method handle the formfield rather than intercepting it, otherwise filter_horizontal etc won't be able to be applied upstream, causing issues such as this

comment:5 Changed 7 years ago by Simon Meers

Resolution: fixed
Status: closedreopened

Hey, I didn't select "closed" or "fixed"... must have been preselected

comment:6 Changed 6 years ago by Russell Keith-Magee

Resolution: fixed
Status: reopenedclosed

(In [13559]) [1.2.X] Fixed #11882 -- Added documentation for formfield_for_manytomany. Thanks to Rob Hudson, timo and Simon Meers for their work on the patch.

Backport of r13552 from trunk.

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