404 and 500 pages wont work

I created 404 and 500 error pages but if I turn debug to false the another error page shows up which isnt mine

theres just

Not Found
The requested resource was not found on this server.

heres my code:


def view_404(request, exception=None):
    return render(request, 'home/404.html', status=404)

def view_500(request):

    return render(request, 'home/500.html')


handler404 = views.view_404
handler500 = views.view_500

Thanks for your help

Django gives 404 and 500 views for free. You don’t have to write your own views. Just put your custom HTML pages at the base of the Templates folder, and they will show up.

Likes this:Screen Shot 2021-10-17 at 11.41.47 AM