Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#14682 closed (fixed)

Class based views docs should be more explicit about template location

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

Description

In the class based views docs, the location of the default template is mentioned:

In this case, the inferred template will be "books/publisher_list.html" -- the 
"books" part comes from the name of the app that defines the model, while the 
"publisher" bit is just the lowercased version of the model's name.

This is misleading because it gives a fairly explicit path without mentioning that this is relative to your templates directory. If you're an experienced Django dev, this is less obvious than you think it is. This should be clarified.

Attachments (1)

generic-views-templates.diff (748 bytes) - added by Adam Vandenberg 6 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 6 years ago by Gabriel Hurley

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedAccepted

Changed 6 years ago by Adam Vandenberg

comment:2 Changed 6 years ago by Adam Vandenberg

Has patch: set

comment:3 Changed 6 years ago by Tim Graham

Resolution: fixed
Status: newclosed

(In [15077]) Fixed #14682 - Add a note with an example of the explicit template location for class based views. Thanks PaulM for the suggestion, adamv for the patch.

comment:4 Changed 5 years ago by Jacob

milestone: 1.3

Milestone 1.3 deleted

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