A
A
Artem Matyashov2016-07-23 22:26:56
Django
Artem Matyashov, 2016-07-23 22:26:56

Why is the 404 page not showing (Django)?

At the root of the project in the templates folder is the 404.html file. In settings.py DEBUG= False. When you navigate to a known unknown URL, a page is displayed that looks like:
--------------------------------
Not Found
The requested URL /test_404 was not found on this server.
-----------------------
If DEBUG = True, then Page Not Found (404)...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Egor Kazantsev, 2016-07-25
@turboj55

Because in urls.py you need to write something like handler404 = 'mysite.views.my_custom_page_not_found_view' and then only do Debug=false

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question