Since the static directory does not "live" in one of the apps (app1
, app2
in your case), django can't find the static directory. So with your current structure you need to add the static directory to the STATICFILES_DIRS
.
From the documentation:
"Your project will probably also have static assets that aren’t tied to a particular app. In addition to using a static/ directory inside your apps, you can define a list of directories (STATICFILES_DIRS) in your settings file where Django will also look for static files."
Something like this:
STATICFILES_DIRS = (
os.path.join(BASE_DIR, "static"),
)
See: https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-STATICFILES_DIRS
Hope this helps.