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 119119# https://docs.djangoproject.com/en/2.1/howto/static-files/
120120
121121STATIC_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 1717from django .contrib import admin
1818from django .urls import path
1919from django .urls import include
20+ from django .contrib .staticfiles .urls import staticfiles_urlpatterns
2021
2122urlpatterns = [
2223 path ('' , include ('hello.urls' )),
2324 path ('admin/' , admin .site .urls ), # Activates the admin interface
2425]
26+
27+ urlpatterns += staticfiles_urlpatterns ()
You can’t perform that action at this time.
0 commit comments