|
@ -1,5 +1,4 @@ |
|
|
from django.urls import path, include |
|
|
from django.urls import path, include |
|
|
from django.conf.urls.i18n import i18n_patterns |
|
|
|
|
|
from django.contrib.staticfiles.urls import staticfiles_urlpatterns |
|
|
from django.contrib.staticfiles.urls import staticfiles_urlpatterns |
|
|
from django.contrib import admin |
|
|
from django.contrib import admin |
|
|
from django.conf import settings |
|
|
from django.conf import settings |
|
@ -31,8 +30,10 @@ urlpatterns = [ |
|
|
|
|
|
|
|
|
# This is only needed when using runserver. |
|
|
# This is only needed when using runserver. |
|
|
if settings.DEBUG: |
|
|
if settings.DEBUG: |
|
|
|
|
|
import debug_toolbar |
|
|
urlpatterns += [ |
|
|
urlpatterns += [ |
|
|
path('media/<path:path>', views.static.serve, # NOQA |
|
|
path('media/<path:path>', views.static.serve, # NOQA |
|
|
{'document_root': settings.MEDIA_ROOT, 'show_indexes': True}), |
|
|
{'document_root': settings.MEDIA_ROOT, 'show_indexes': True}), |
|
|
|
|
|
path('__debug__/', include(debug_toolbar.urls)), |
|
|
] |
|
|
] |
|
|
urlpatterns += staticfiles_urlpatterns() |
|
|
urlpatterns += staticfiles_urlpatterns() |
|
|