В views.py
def handler_error_404(request, exception):
return render(request, '404.html', status=404)
Здесь 404.html
- это пользовательская страница 404
В твоем основном urls.py
from your_app.views import handler_error_404
handler404 = handler_error_404
# Here put your urlpatterns
Убедитесь, что внутри settings.py
, DEBUG
установлено на False