November 2015
Beginner to intermediate
840 pages
26h 30m
English
The problem with our code in the previous section is that it was limited to our apps. The /about/ page, for instance, was without any style. To change that, we can create a CSS stylesheet for the entire website.
Just as with templates, we start by creating a directory to store our site-wide templates in the top directory of our project. We can also create the site static namespace in the same command, as shown in Example 16.8.
Example 16.8: Shell Code
$ mkdir -p static/site
In Example 16.9, we add the STATICFILES_DIRS setting to our settings.py file to let Django know to look in this directory for static files.
Example 16.9: Project Code
Read now
Unlock full access