Generally, you'll store templates in files on your filesystem rather than using the low-level Template
API yourself. Save templates in a directory specified as a template directory. Django searches for template directories in a number of places, depending on your template loading settings (see Loader types below), but the most basic way of specifying template directories is by using the DIRS
option.
Tell Django what your template directories are by using the DIRS
option in the TEMPLATES
setting in your settings file-or the dirs
argument of Engine
. This should be set to a list of strings that contain full paths to your template directories:
TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [ '/home/html/templates/lawrence.com', '/home/html/templates/default', ], }, ]
Your templates can go anywhere you want, as...