File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change 119
119
# https://docs.djangoproject.com/en/2.1/howto/static-files/
120
120
121
121
STATIC_URL = '/static/'
122
+
123
+ # The location where the collectstatic command collects static files from apps.
124
+ # A dedicated static file server is typically used in production to serve files
125
+ # from this location, rather than relying on the app server to serve those files
126
+ # from various locations in the app. Doing so results in better overall performance.
127
+ STATIC_ROOT = os .path .join (BASE_DIR , 'static_collected' )
Original file line number Diff line number Diff line change 17
17
from django .contrib import admin
18
18
from django .urls import path
19
19
from django .urls import include
20
+ from django .contrib .staticfiles .urls import staticfiles_urlpatterns
20
21
21
22
urlpatterns = [
22
23
path ('' , include ('hello.urls' )),
23
24
path ('admin/' , admin .site .urls ), # Activates the admin interface
24
25
]
26
+
27
+ urlpatterns += staticfiles_urlpatterns ()
You can’t perform that action at this time.
0 commit comments