I have multiple apps and each of them has static file. And also I want to add some global static file like jQuery.
My project structure is like
--mysite
|------app1
|-----static
|------app2
|-----static
|------app3
|-----static
|------media
|------static (global one)
|-----app1
|-----app2
|-----app3
my setting file is like
STATIC_ROOT = os.path.join(BASE_DIR, 'static/')
STATIC_URL = '/static/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media/')
MEDIA_URL = '/media/'
and url file is like
urlpatterns = [
url(r'^$', 'home.views.index'),
url(r'^admin/', include(admin.site.urls)),
url(r'^users/', include('users.urls')),
url(r'^projects/', include('cvproject.urls'))
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) + \
static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
I am developing the web app following the example on the Django website.
When I load static file in templates, it can only find the files in the individual directories. And how can I load the global static files?
Thank you