Added static route to global urls
This commit is contained in:
parent
4bf2eb6389
commit
540a6b9d14
2 changed files with 7 additions and 4 deletions
|
@ -15,14 +15,18 @@ Including another URLconf
|
||||||
"""
|
"""
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from django.urls import path, include
|
from django.urls import path, include
|
||||||
|
from django.conf import settings
|
||||||
|
from django.conf.urls.static import static
|
||||||
from django.conf.urls.i18n import i18n_patterns
|
from django.conf.urls.i18n import i18n_patterns
|
||||||
from django.views.i18n import JavaScriptCatalog
|
from django.views.i18n import JavaScriptCatalog
|
||||||
|
|
||||||
urlpatterns = i18n_patterns(
|
urlpatterns = i18n_patterns(
|
||||||
path('', include('counter.urls')),
|
path('', include('counter.urls')),
|
||||||
path('admin/', admin.site.urls),
|
path('admin/', admin.site.urls),
|
||||||
|
|
||||||
path('accounts/', include('user.urls')),
|
path('accounts/', include('user.urls')),
|
||||||
path('accounts/', include('django.contrib.auth.urls')),
|
path('accounts/', include('django.contrib.auth.urls')),
|
||||||
path('jsi18n/', JavaScriptCatalog.as_view(), name='javascript-catalog'),
|
path('jsi18n/', JavaScriptCatalog.as_view(), name='javascript-catalog'),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
|
||||||
|
|
|
@ -5,9 +5,8 @@ chdir = %d/
|
||||||
# load Django's wsgi.py for this application
|
# load Django's wsgi.py for this application
|
||||||
module = arrowcounter.wsgi:application
|
module = arrowcounter.wsgi:application
|
||||||
|
|
||||||
# serve static files under app static dirs
|
# serve static files under the global static dir
|
||||||
static-map2 = /static=%d/counter
|
static-map2 = /static=%d
|
||||||
static-map2 = /static=%d/user
|
|
||||||
static-expires = /* 7776000
|
static-expires = /* 7776000
|
||||||
offload-threads = %k
|
offload-threads = %k
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue