Code

Opened 4 years ago

Closed 10 months ago

Last modified 10 months ago

#14006 closed Cleanup/optimization (fixed)

Documentation on Field's 'description' class attribute does not mention that it will be interpolated with field.__dict__

Reported by: abeld Owned by: nobody
Component: Documentation Version: 1.2
Severity: Normal Keywords:
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 "Documenting your Custom Field" section in the "Writing custom
model fields" page
(http://docs.djangoproject.com/en/1.2/howto/custom-model-fields/) does
not mention that this string will be string-interpolated with
fields.dict (in the get_readable_field_data_type() function in
django.contrib.admindocs.views ) and thus can (and should, if
appropriate, since it really increases the usability of the admin
docs) contain stuff like %(some_attribute)s, and the example presented
doesn't show this feature, either.

Attachments (1)

14006.diff (790 bytes) - added by timo 10 months ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 4 years ago by gabrielhurley

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

comment:2 Changed 3 years ago by julien

  • Severity set to Normal
  • Type set to Cleanup/optimization

comment:3 Changed 2 years ago by aaugustin

  • UI/UX unset

Change UI/UX from NULL to False.

comment:4 Changed 2 years ago by aaugustin

  • Easy pickings unset

Change Easy pickings from NULL to False.

Changed 10 months ago by timo

comment:5 Changed 10 months ago by timo

  • Has patch set

comment:6 Changed 10 months ago by claudep

  • Triage Stage changed from Accepted to Ready for checkin

comment:7 Changed 10 months ago by Tim Graham <timograham@…>

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

In 2d96e660f9fb5cbc16de74f29d66daee6d8eaa44:

Fixed #14006 -- Documented that Field's 'description' attribute is interpolated with field.dict

Thanks abeld for the suggestion.

comment:8 Changed 10 months ago by Tim Graham <timograham@…>

In a22b2aea192e8722aa3004c9e50e728438a453cd:

[1.6.x] Fixed #14006 -- Documented that Field's 'description' attribute is interpolated with field.dict

Thanks abeld for the suggestion.

Backport of 2d96e660f9 from master.

comment:9 Changed 10 months ago by Tim Graham <timograham@…>

In 80673e20f212fbefd1a8d53ae521e95c6eedf201:

[1.5.x] Fixed #14006 -- Documented that Field's 'description' attribute is interpolated with field.dict

Thanks abeld for the suggestion.

Backport of 2d96e660f9 from master.

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.