From c002b2da8eb421150317d362f3b333adcfc49ba7 Mon Sep 17 00:00:00 2001 From: altf4arnold Date: Fri, 23 Feb 2024 22:45:07 +0100 Subject: [PATCH] 404 and 500 --- tldtest/templates/404.html | 5 +++++ tldtest/templates/500.html | 5 +++++ tldtest/views.py | 3 --- 3 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 tldtest/templates/404.html create mode 100644 tldtest/templates/500.html diff --git a/tldtest/templates/404.html b/tldtest/templates/404.html new file mode 100644 index 0000000..e6be426 --- /dev/null +++ b/tldtest/templates/404.html @@ -0,0 +1,5 @@ +{% extends "base.html" %} +{% block title %}Error 404{% endblock %} +{% block content %} + +{% endblock content %} diff --git a/tldtest/templates/500.html b/tldtest/templates/500.html new file mode 100644 index 0000000..8446050 --- /dev/null +++ b/tldtest/templates/500.html @@ -0,0 +1,5 @@ +{% extends "base.html" %} +{% block title %}Error 404{% endblock %} +{% block content %} + +{% endblock content %} diff --git a/tldtest/views.py b/tldtest/views.py index da5ec29..a7fab18 100644 --- a/tldtest/views.py +++ b/tldtest/views.py @@ -6,12 +6,9 @@ class Index(TemplateView): template_name = 'home.html' -""" def handler404(request): return render(request, '404.html', status=404) def handler500(request): return render(request, '500.html', status=500) - -"""