August 2016
Beginner to intermediate
717 pages
15h 24m
English
Static files such as JavaScript files, CSS, or images are essential to obtain an ergonomic website. These files are often stored in a folder, but they can be useful to modify this folder under development or in production.
According to the URLs, Django allows us to define a folder containing the static files and to easily modify its location when required.
To set the path where Django will look for static files, we have to change our settings.py file by adding or changing the following line:
STATIC_URL = '/static/'
STATICFILES_DIRS = (
os.path.join(PROJECT_ROOT, '../TasksManager/static/'),
)We will define a proper architecture for our future static files. It is important to choose an early consistent architecture, ...
Read now
Unlock full access