STATIC_URL = '/static/' STATIC_ROOT = os.path.join(BASE_DIR, "/static/") STATICFILES_DIRS = ( STATIC_ROOT, )
Here is what the above code is Doing:
1. We are adding a new setting to our settings.py file, STATIC_ROOT. This is the path where Django will collect all the static files from our static folders and the static folders of any apps we use.
2. We are also adding a new setting, STATICFILES_DIRS. This is the path to our static folder.
3. We are adding a new setting, STATICFILES_STORAGE. This is where Django will store our static files.
4. We are adding a new setting, STATIC_URL. This is the URL that our static files will be served from.