chore(app/urls): Cleaner file
This commit is contained in:
parent
9c4413faa1
commit
61bb59d244
1 changed files with 6 additions and 8 deletions
|
@ -14,11 +14,11 @@ Including another URLconf
|
|||
1. Import the include() function: from django.urls import include, path
|
||||
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
||||
"""
|
||||
|
||||
from django.conf import settings
|
||||
from django.conf.urls.static import static
|
||||
from django.contrib import admin
|
||||
from django.urls import include, path
|
||||
from django.views.generic import TemplateView
|
||||
|
||||
urlpatterns = [
|
||||
path("", include("dgsi.urls")),
|
||||
|
@ -29,10 +29,8 @@ urlpatterns = [
|
|||
]
|
||||
|
||||
if settings.DEBUG:
|
||||
urlpatterns += (
|
||||
[
|
||||
path("__debug__/", include("debug_toolbar.urls")),
|
||||
]
|
||||
+ static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
|
||||
+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||
)
|
||||
urlpatterns += [
|
||||
path("__debug__/", include("debug_toolbar.urls")),
|
||||
*static(settings.STATIC_URL, document_root=settings.STATIC_ROOT),
|
||||
*static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT),
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue