From dda71c9dc94098e941578eaf3572d541929df5e9 Mon Sep 17 00:00:00 2001 From: erjemin Date: Wed, 18 Feb 2026 19:02:08 +0300 Subject: [PATCH] =?UTF-8?q?add:=20=D1=81=D1=82=D1=80=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D1=86=D1=8B=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BE=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dicquo/dicquo/urls.py | 7 +++++++ dicquo/templates/400.html | 31 +++++++++++++++++++++++++++++++ dicquo/templates/403.html | 31 +++++++++++++++++++++++++++++++ dicquo/templates/404.html | 31 +++++++++++++++++++++++++++++++ dicquo/templates/500.html | 31 +++++++++++++++++++++++++++++++ 5 files changed, 131 insertions(+) create mode 100644 dicquo/templates/400.html create mode 100644 dicquo/templates/403.html create mode 100644 dicquo/templates/404.html create mode 100644 dicquo/templates/500.html diff --git a/dicquo/dicquo/urls.py b/dicquo/dicquo/urls.py index 45537be..01aa377 100644 --- a/dicquo/dicquo/urls.py +++ b/dicquo/dicquo/urls.py @@ -18,6 +18,7 @@ from django.contrib import admin from django.urls import path, re_path from django.conf.urls.static import static from django.contrib.sitemaps.views import sitemap +from django.views.generic import TemplateView from dicquo import settings from web import views from web.sitemaps import DictumSitemap @@ -36,3 +37,9 @@ urlpatterns = [ if settings.DEBUG: urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) + urlpatterns += [ + path('404/', TemplateView.as_view(template_name="404.html")), + path('500/', TemplateView.as_view(template_name="500.html")), + path('403/', TemplateView.as_view(template_name="403.html")), + path('400/', TemplateView.as_view(template_name="400.html")), + ] diff --git a/dicquo/templates/400.html b/dicquo/templates/400.html new file mode 100644 index 0000000..bf83d51 --- /dev/null +++ b/dicquo/templates/400.html @@ -0,0 +1,31 @@ +{% extends "base.html" %} + +{% block Title %}400: Плохой запрос{% endblock %} + +{% block CONTENT %}{% include "blocks/header_nav.html" %} +
+ +
+ + +
+ +
+ «Вы спрашиваете меня о чем-то странном. Я не понимаю ваш запрос.» +
+ + +
+ Озадаченный Сервер (400) +
+
+ +
+ + + +
+ +{% endblock %} diff --git a/dicquo/templates/403.html b/dicquo/templates/403.html new file mode 100644 index 0000000..e7fb3c8 --- /dev/null +++ b/dicquo/templates/403.html @@ -0,0 +1,31 @@ +{% extends "base.html" %} + +{% block Title %}403: Доступ запрещен{% endblock %} + +{% block CONTENT %}{% include "blocks/header_nav.html" %} +
+ +
+ + +
+ +
+ «Вам сюда нельзя. Даже если очень хочется. Уходите!» +
+ + +
+ Строгий Вахтёр (403) +
+
+ +
+ + + +
+ +{% endblock %} diff --git a/dicquo/templates/404.html b/dicquo/templates/404.html new file mode 100644 index 0000000..69d3109 --- /dev/null +++ b/dicquo/templates/404.html @@ -0,0 +1,31 @@ +{% extends "base.html" %} + +{% block Title %}404: Страница не найдена{% endblock %} + +{% block CONTENT %}{% include "blocks/header_nav.html" %} +
+ +
+ + +
+ +
+ «Я искал везде. Даже под диваном. Этой страницы здесь нет.» +
+ + +
+ Системный Администратор (404) +
+
+ +
+ + + +
+ +{% endblock %} diff --git a/dicquo/templates/500.html b/dicquo/templates/500.html new file mode 100644 index 0000000..bfe3fa2 --- /dev/null +++ b/dicquo/templates/500.html @@ -0,0 +1,31 @@ +{% extends "base.html" %} + +{% block Title %}500: Ошибка сервера{% endblock %} + +{% block CONTENT %}{% include "blocks/header_nav.html" %} +
+ +
+ + +
+ +
+ «Что-то пошло не так. Кажется, я уронил сервер. Подождите, пока я его подниму.» +
+ + +
+ Системный Администратор (500) +
+
+ +
+ + + +
+ +{% endblock %}