добавил страницы ошибок 403 и 404, убрал вьюху для фавикона (потому что его отдает nginx)
This commit is contained in:
parent
981ad1b286
commit
feb18af30b
@ -23,5 +23,4 @@ urlpatterns = [
|
|||||||
path('', include('index.urls')),
|
path('', include('index.urls')),
|
||||||
path('account/', include('users.urls')),
|
path('account/', include('users.urls')),
|
||||||
path('admin/', admin.site.urls),
|
path('admin/', admin.site.urls),
|
||||||
path('favicon.ico', lambda req: serve(req, 'favicon.svg'))
|
|
||||||
]
|
]
|
||||||
|
12
templates/403.html
Normal file
12
templates/403.html
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{% extends 'base.html' %}
|
||||||
|
{% load static %}
|
||||||
|
|
||||||
|
{% block title %} Отказано в доступе {% endblock %}
|
||||||
|
|
||||||
|
{% block header %}
|
||||||
|
<h1> {% if page_name %}{{ page_name }}{% else %}403 Forbidden{% endif %} </h1>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<h2>Недостаточно прав для просмотра данной страницы</h2>
|
||||||
|
{% endblock %}
|
12
templates/404.html
Normal file
12
templates/404.html
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{% extends 'base.html' %}
|
||||||
|
{% load static %}
|
||||||
|
|
||||||
|
{% block title %} Страница не найдена {% endblock %}
|
||||||
|
|
||||||
|
{% block header %}
|
||||||
|
<h1> {% if page_name %}{{ page_name }}{% else %}404 Not Found{% endif %} </h1>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<h2>Страница не найдена</h2>
|
||||||
|
{% endblock %}
|
Loading…
x
Reference in New Issue
Block a user