urls.py 546 B

123456789101112131415161718192021
  1. from django.contrib import admin
  2. from django.conf import settings
  3. from django.urls import path, include
  4. from django.conf.urls.static import static
  5. urlpatterns = (
  6. [
  7. path('admin/', admin.site.urls),
  8. path('', include('SharixAdmin.urls')),
  9. path('todo/', include("todo.urls"), name='todo'),
  10. ]
  11. + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
  12. + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
  13. )
  14. if settings.DEBUG:
  15. urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)