Update urls & add custom error pages
This commit is contained in:
parent
ce5031b64f
commit
0787465224
5 changed files with 58 additions and 10 deletions
|
@ -1,4 +1,3 @@
|
|||
from django.shortcuts import redirect
|
||||
from django.urls import path
|
||||
|
||||
from . import views
|
||||
|
@ -15,8 +14,3 @@ urlpatterns = [
|
|||
path('albums/', views.AlbumsList.as_view(), name='albums_url'),
|
||||
path('<path:redir_path>/', views.redirect_to_album, name='redirect_to_album'),
|
||||
]
|
||||
|
||||
def custom_404_view(request, exception):
|
||||
return redirect('/')
|
||||
|
||||
handler404 = 'gallery.urls.custom_404_view'
|
Loading…
Add table
Add a link
Reference in a new issue