python - Redirect any urls to 404.html if not found in urls.py in django -
how can redirect kind of url patterns created page "404.html" page if doesn't exist in urls.py rather being shown error django.
make view that'll render created 404.html , set handler404 in urls.py.
handler404 = 'app.views.404_view'
django render debug view if debug enabled. else it'll render 404 page specified in handler404 types of pages if doesn't exist.
django documentation on customizing error views.
check this answer complete example.
Comments
Post a Comment