Code

Opened 6 years ago

Closed 6 years ago

Last modified 3 years ago

#8299 closed (fixed)

Docs on ModelAdmin.form attribute need improvement

Reported by: jarrow Owned by: nobody
Component: Documentation Version: master
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

At the moment it is not really clear from the docs that you have to supply a subclass that already has a Meta class in it. From reading it I thought this would be added by the admin (as happens if you don't set the form attribute). This interpretation is also enforced by the lack of a Meta class in the validation example given later on. The attached patch fixes the example and tries to be a bit more explicit in the form attribute explanation.

Attachments (1)

form-attribute-doc-fix-00.diff (1.2 KB) - added by jarrow 6 years ago.

Download all attachments as: .zip

Change History (6)

Changed 6 years ago by jarrow

comment:1 Changed 6 years ago by mtredinnick

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

comment:2 Changed 6 years ago by brosner

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

(In [8395]) Fixed #8299 -- Clarified the ModelAdmin.form option. Also added an inner Meta class to the ModelForm example in adding custom validation to the admin. Thanks jarrow for the report and initial patch.

comment:3 Changed 6 years ago by jarrow

  • Resolution fixed deleted
  • Status changed from closed to reopened

The link to the section is somehow broken. At least with the locally generated docs my patch worked. I looked the syntax up here: http://docutils.sourceforge.net/docs/user/rst/quickref.html#implicit-hyperlink-targets

comment:4 Changed 6 years ago by Alex

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

This is a separate issue, please open a new ticket for it.

comment:5 Changed 3 years ago by jacob

  • milestone 1.0 deleted

Milestone 1.0 deleted

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.