Opened 13 years ago

Closed 13 years ago

Last modified 13 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: no UI/UX: no

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 13 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 by Gabriel Hurley, 13 years ago

Triage Stage: UnreviewedAccepted

by Adam Vandenberg, 13 years ago

comment:2 by Adam Vandenberg, 13 years ago

Has patch: set

comment:3 by Tim Graham, 13 years ago

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 by Jacob, 13 years ago

milestone: 1.3

Milestone 1.3 deleted

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