404 page renders index page

This commit is contained in:
2024-09-11 16:19:36 +02:00
parent ec0fb00167
commit 45002ad341
4 changed files with 8 additions and 3 deletions

View File

@ -23,7 +23,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent
SECRET_KEY = 'django-insecure-vgcqdf^%(+@t*+cof@755e#q9p)myir%z2s*e*ea*v^i(4pta9' SECRET_KEY = 'django-insecure-vgcqdf^%(+@t*+cof@755e#q9p)myir%z2s*e*ea*v^i(4pta9'
# SECURITY WARNING: don't run with debug turned on in production! # SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True DEBUG = False
ALLOWED_HOSTS = ['*'] ALLOWED_HOSTS = ['*']

View File

@ -6,9 +6,9 @@
# By: tomoron <tomoron@student.42.fr> +#+ +:+ +#+ # # By: tomoron <tomoron@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ # # +#+#+#+#+#+ +#+ #
# Created: 2024/09/09 16:10:26 by tomoron #+# #+# # # Created: 2024/09/09 16:10:26 by tomoron #+# #+# #
# Updated: 2024/09/09 16:53:01 by tomoron ### ########.fr # # Updated: 2024/09/11 14:03:28 by tomoron ### ########.fr #
# # # #
# **************************************************************************** # # **************************************************************************** #
def gameRequest(socket, content): def gameRequest(socket, content):
print("nope") print("fils de pute")

View File

@ -25,3 +25,5 @@ urlpatterns = [
path("logout", views.logout, name='logout'), path("logout", views.logout, name='logout'),
path("verify", views.verify, name='verify') path("verify", views.verify, name='verify')
] ]
handler404 = "server.views.handler404"

View File

@ -82,3 +82,6 @@ def login42(request):
def logout(request): def logout(request):
request.session.delete() request.session.delete()
return redirect("/") return redirect("/")
def handler404(request, exception):
return(index(request));