I am trying to handle a 404 http response error on the site. I want my 404.html content to be displayed, but for some reason when I run my local host I do get the response displayed, but my site doesn't look the same as in my contents aren't being displayed as they should. I don't know why this is happening, but I want to make sure I am properly calling in my handler. Any suggestions would be appreciated.
My views.py
def handler404(request, exception):
return render(request, 'webpage/404.html')
My 404.html
{% extends "webpage/base.html" %}
{% block content %}
{% load static %}
<h1>404 Error</h1>
{% endblock %}
My Url.py
urlpatterns = [
path('admin/', admin.site.urls),
path('', include('webpage.urls')),
]
handler404 = views.handler404