Update urls & add custom error pages
This commit is contained in:
parent
ce5031b64f
commit
0787465224
5 changed files with 58 additions and 10 deletions
|
@ -2,12 +2,16 @@ 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 RedirectView
|
||||
|
||||
urlpatterns = [
|
||||
path('admin/', admin.site.urls),
|
||||
path('', include(('gallery.urls', 'gallery'), namespace='gallery')),
|
||||
path('favicon.ico/', RedirectView.as_view(url='/static/favicon.ico', permanent=True)),
|
||||
path('', include(('gallery.urls', 'gallery'), namespace='gallery')),
|
||||
]
|
||||
|
||||
if settings.DEBUG:
|
||||
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
|
||||
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue