Code

Opened 5 years ago

Closed 4 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@…> 5 years ago.
11882.diff (1.4 KB) - added by timo 4 years ago.
small edits to existing patch
formfield_for_docs.diff (1.7 KB) - added by DrMeers 4 years ago.
Updated documentation to fix buggy example code

Download all attachments as: .zip

Change History (9)

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

  • Needs documentation unset
  • Needs tests unset
  • Owner changed from nobody to anonymous
  • Patch needs improvement unset
  • Status changed from new to assigned
  • Triage Stage changed from Unreviewed to Accepted

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

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

  • Has patch set

Changed 4 years ago by timo

small edits to existing patch

comment:3 Changed 4 years ago by timo

  • Triage Stage changed from Accepted to Ready for checkin

Changed 4 years ago by DrMeers

Updated documentation to fix buggy example code

comment:4 Changed 4 years ago by DrMeers

  • Resolution set to fixed
  • Status changed from assigned to closed

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 4 years ago by DrMeers

  • Resolution fixed deleted
  • Status changed from closed to reopened

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

comment:6 Changed 4 years ago by russellm

  • Resolution set to fixed
  • Status changed from reopened to closed

(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.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.