Update urls & add custom error pages

This commit is contained in:
Nyymix 2025-03-22 00:46:17 +02:00
parent ce5031b64f
commit 0787465224
5 changed files with 58 additions and 10 deletions

View file

@ -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'