November 2015
Beginner to intermediate
840 pages
26h 30m
English
While Django knows to look in each app folder for the template/ directory, Django does not have a default folder to check for templates that are not built for a specific app. We can therefore place these templates anywhere.
To keep things simple, I recommend creating a templates/ directory in the root project directory.
We now need to inform Django of the existence of our new directory. In /suorganizer/settings.py, we can find the TEMPLATES setting, which contains all of the settings for templates. We’re going to override the DIRS key, which is currently an empty list. We need to give DIRS an absolute path to our template directory. We can create this absolute path by using the
Read now
Unlock full access