404 and 500

This commit is contained in:
Arnold Dechamps 2024-02-23 22:45:07 +01:00
parent c3b6e8cb5b
commit c002b2da8e
No known key found for this signature in database
GPG key ID: AE66543374E41C89
3 changed files with 10 additions and 3 deletions

View file

@ -0,0 +1,5 @@
{% extends "base.html" %}
{% block title %}Error 404{% endblock %}
{% block content %}
<img src="https://http.cat/images/404.jpg">
{% endblock content %}

View file

@ -0,0 +1,5 @@
{% extends "base.html" %}
{% block title %}Error 404{% endblock %}
{% block content %}
<img src="https://http.cat/images/500.jpg">
{% endblock content %}

View file

@ -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)
"""