#32521: Possible documentation error re. template directories
-------------------------------------+-------------------------------------
Reporter: Mike Slinn | Owner: nobody
Type: | Status: closed
Cleanup/optimization |
Component: Documentation | Version: 3.1
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):
* status: new => closed
* type: Uncategorized => Cleanup/optimization
* resolution: => invalid
Comment:
This page describes how to override templates in three ways:
- ''"Overriding from the project’s templates directory"''
- ''"Overriding from an app’s template directory"''
- ''"Extending an overridden template"''
> It is unclear what "the first method" might be. Earlier in the page
there was no mention of an enumeration of options.
TBH I cannot imagine how we could be clearer. ''"... it’s more common to
use the first method and put template overrides in a project’s templates
folder."'' so the first method is to ''"...put template overrides in a
project’s templates folder..."'' i.e. the first way described on this
page.
> Apparently per-app templates are preferred, but there is not a single
example of this, nor a directory layout image, and instead all the detail
goes to the per-project option.
That's not true, this is described in the
[https://docs.djangoproject.com/en/3.1/howto/overriding-templates
/#overriding-from-an-app-s-template-directory "Overriding from an app’s
template directory"] section, with an example of directory structure:
> ''"If you want to put the template overrides in **an app** called
**myapp** and the templates to override are named blog/list.html and
blog/post.html, then your directory structure will look like:"''
--
Ticket URL: <https://code.djangoproject.com/ticket/32521#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/064.3f1d35746095435450e25c2cbd8a47fc%40djangoproject.com.