Opened 15 years ago

Closed 14 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: no UI/UX: no

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@…> 14 years ago.
11882.diff (1.4 KB ) - added by Tim Graham 14 years ago.
small edits to existing patch
formfield_for_docs.diff (1.7 KB ) - added by Simon Meers 14 years ago.
Updated documentation to fix buggy example code

Download all attachments as: .zip

Change History (9)

comment:1 by Rob Hudson <treborhudson@…>, 14 years ago

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

by Rob Hudson <treborhudson@…>, 14 years ago

Attachment: 11822.diff added

comment:2 by Rob Hudson <treborhudson@…>, 14 years ago

Has patch: set

by Tim Graham, 14 years ago

Attachment: 11882.diff added

small edits to existing patch

comment:3 by Tim Graham, 14 years ago

Triage Stage: AcceptedReady for checkin

by Simon Meers, 14 years ago

Attachment: formfield_for_docs.diff added

Updated documentation to fix buggy example code

comment:4 by Simon Meers, 14 years ago

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 by Simon Meers, 14 years ago

Resolution: fixed
Status: closedreopened

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

comment:6 by Russell Keith-Magee, 14 years ago

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