November 2015
Beginner to intermediate
840 pages
26h 30m
English
The staticfiles contributed app is enabled by default in the INSTALLED_APPS list in suorganizer/settings.py, which means we can jump straight into it.
Much like templates, static files are app-centric by default. In Example 16.1, we create a static/ directory in each of our apps, and then namespace these directories again, just as we did our templates.
Example 16.1: Shell Code
$ mkdir -p organizer/static/organizer $ mkdir -p blog/static/blog
With the directories in place, we can now create CSS files in each of these directories, as shown in Example 16.2.
Example 16.2: Shell Code
$ touch organizer/static/organizer/style.css $ touch blog/static/blog/style.css ...
Read now
Unlock full access