Opened 6 years ago

Closed 3 years ago

Last modified 3 years 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 Tim Graham 3 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 6 years ago by Gabriel Hurley

Triage Stage: UnreviewedAccepted

comment:2 Changed 6 years ago by Julien Phalip

Severity: Normal
Type: Cleanup/optimization

comment:3 Changed 5 years ago by Aymeric Augustin

UI/UX: unset

Change UI/UX from NULL to False.

comment:4 Changed 5 years ago by Aymeric Augustin

Easy pickings: unset

Change Easy pickings from NULL to False.

Changed 3 years ago by Tim Graham

Attachment: 14006.diff added

comment:5 Changed 3 years ago by Tim Graham

Has patch: set

comment:6 Changed 3 years ago by Claude Paroz

Triage Stage: AcceptedReady for checkin

comment:7 Changed 3 years ago by Tim Graham <timograham@…>

Resolution: fixed
Status: newclosed

In 2d96e660f9fb5cbc16de74f29d66daee6d8eaa44:

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

Thanks abeld for the suggestion.

comment:8 Changed 3 years 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 3 years 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.

Note: See TracTickets for help on using tickets.
Back to Top