Opened 6 years ago

Closed 5 years ago

Last modified 5 years ago

#14682 closed (fixed)

Class based views docs should be more explicit about template location

Reported by: PaulM 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:


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 adamv 6 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 6 years ago by gabrielhurley

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

Changed 6 years ago by adamv

comment:2 Changed 6 years ago by adamv

  • Has patch set

comment:3 Changed 5 years ago by timo

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

(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 deleted

Milestone 1.3 deleted

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