From 830c0d5ed67c4846d554f730d9fc2ce21e8fb494 Mon Sep 17 00:00:00 2001 From: erichhasl Date: Sun, 19 Nov 2017 16:50:31 +0100 Subject: [PATCH] improve error page --- web_dev/sas_web/sas_web/views.py | 3 ++- web_dev/sas_web/static/public/css/default.css | 4 ++++ web_dev/sas_web/templates/404.html | 4 ++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/web_dev/sas_web/sas_web/views.py b/web_dev/sas_web/sas_web/views.py index 2059189..2d41d33 100644 --- a/web_dev/sas_web/sas_web/views.py +++ b/web_dev/sas_web/sas_web/views.py @@ -3,4 +3,5 @@ from django.http import HttpResponseNotFound def error_404(request): - return HttpResponseNotFound(render_to_string('404.html')) + return HttpResponseNotFound(render_to_string('404.html', + context={'url': request.path})) diff --git a/web_dev/sas_web/static/public/css/default.css b/web_dev/sas_web/static/public/css/default.css index c6f2fb6..b4b078d 100644 --- a/web_dev/sas_web/static/public/css/default.css +++ b/web_dev/sas_web/static/public/css/default.css @@ -11,3 +11,7 @@ #content a:hover { color: #48140a; } + +#content h1 { + color: #9F2D17; +} diff --git a/web_dev/sas_web/templates/404.html b/web_dev/sas_web/templates/404.html index 39c4b36..8bbc25d 100644 --- a/web_dev/sas_web/templates/404.html +++ b/web_dev/sas_web/templates/404.html @@ -2,5 +2,9 @@ {% block content %}

Huch? Wo willst du denn hin?

+

Normalerweise kenne ich mich hier ganz gut aus, aber von {{ url }} habe ich noch nie +gehört. Vielleicht meintest du ja etwas anderes?

+

Hier geht es zurück zur Startseite.

+ {% endblock %}