Code

Opened 17 months ago

Closed 17 months ago

Last modified 17 months ago

#19887 closed Cleanup/optimization (fixed)

ModelAdmin.fields and ModelAdmin.fieldset not very detailed documented

Reported by: Patrick Strasser <patrick@…> Owned by: zsiciarz
Component: Documentation Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

ModelAdmin.fields and ModelAdmin.fieldset are not very detailed documented compared to ModelAdmin.display_list. It is not clear if only fields or callables too can be used, and how to do so. In fact, callables need to be in readonly_fields, which is quite logical after you found out, but no hint is given in the documentation.

This could be presented in comparison to the "list" display properties, where you have to state so if you want to make fields editable.

Maybe noteworth is some hint about callables that you want to make writable. I guess in that case a custom Field would be the Right Thing (?).

Attachments (0)

Change History (7)

comment:1 Changed 17 months ago by carljm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted
  • Type changed from Uncategorized to New feature

I've noticed this omission before; I think it would be reasonable for the fields/fieldsets documentation to make some note of what non-fields are allowed and under what circumstances.

comment:2 Changed 17 months ago by zsiciarz

  • Owner changed from nobody to zsiciarz
  • Status changed from new to assigned

comment:3 Changed 17 months ago by zsiciarz

  • Version changed from 1.4 to master

comment:4 Changed 17 months ago by zsiciarz

  • Has patch set
  • Type changed from New feature to Cleanup/optimization

comment:5 Changed 17 months ago by Tim Graham <timograham@…>

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

In 722683f508566cf06bcc85f9f1810c3cde80344c:

Fixed #19887 - Noted when callables may be used in ModelAdmin.fields and ModelAdmin.fieldset.

Thanks Patrick Strasser for the suggestion and Zbigniew Siciarz for the patch.

comment:6 Changed 17 months ago by Tim Graham <timograham@…>

In 89fb1836a8e6115317a08c43dceee985377535fb:

[1.5.x] Fixed #19887 - Noted when callables may be used in ModelAdmin.fields and ModelAdmin.fieldset.

Thanks Patrick Strasser for the suggestion and Zbigniew Siciarz for the patch.

Backport of 722683f508 from master.

comment:7 Changed 17 months ago by Patrick Strasser <patrick@…>

Wow, now I'm impressed by the fast reaction!

Thanks, and keep up the fine work!

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.