There isn't anything complicated about what we'll do here. It should be very easy for you to follow along, so I'll just give you the code to write and leave the explanation, as we have done all of this many times before in the previous chapters.
Start by creating a templates
directory in the project root. Next, add it to the list of DIRS
in the TEMPLATES
configuration variable in our formmason/settings.py
file. The settings.py
file already has a TEMPLATES
variable configured, so go ahead and replace the DIRS
list in this dictionary with the value that you see here:
TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [ os.path.join(BASE_DIR, 'templates'), ], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib...