diff --git a/re2o/urls.py b/re2o/urls.py index 3322e82b..87a5b346 100644 --- a/re2o/urls.py +++ b/re2o/urls.py @@ -50,6 +50,7 @@ from django.contrib.auth import views as auth_views from .views import index, about_page handler500 = 're2o.views.handler500' +handler404 = 're2o.views.handler404' urlpatterns = [ url(r'^$', index, name='index'), diff --git a/re2o/views.py b/re2o/views.py index 3c5cde09..8d98d927 100644 --- a/re2o/views.py +++ b/re2o/views.py @@ -229,3 +229,8 @@ def about_page(request): def handler500(request): """The handler view for a 500 error""" return render(request, 'errors/500.html') + + +def handler404(request): + """The handler view for a 404 error""" + return render(request, 'errors/404.html') diff --git a/templates/errors/404.html b/templates/errors/404.html new file mode 100644 index 00000000..fdf5ec77 --- /dev/null +++ b/templates/errors/404.html @@ -0,0 +1,227 @@ +{% comment %} +Re2o est un logiciel d'administration développé initiallement au rezometz. Il +se veut agnostique au réseau considéré, de manière à être installable en +quelques clics. + +Copyright © 2018 Hugo Levy-Falk + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along +with this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +{% endcomment %} + +{% load i18n %} +{% load staticfiles %} + + + + + + + + + + + + + + + 404, Page not Found + + + + + +

{% trans "Yup, that's a 404 error."%} {% trans "(Go to a known place)"%}

+ + {%trans "Your browser does not support the HTML5 canvas tag."%} + + + + +