Using Django, you can override the default 404 page by doing this in the root urls.py
:
handler404 = 'path.to.views.custom404'
How to do this when using Class based views? I can't figure it out and the documentation doesn't seem to say anything.
I've tried:
handler404 = 'path.to.view.Custom404.as_view'
Never mind, I forgot to try this:
Seems so simple now, it probably doesn't merit a question on StackOverflow.
Managed to make it work by having the following code in my custom 404 CBV (found it on other StackOverflow post: Django handler500 as a Class Based View)
In my root URLConf file I have the following: