Thank you. There's a little typo on the django.views.default. It should be django.views.defaults.
Anyway, I think it worked. The only question I think I have is if the template should be inside errors or if its ok if the template is inside the template folder together with the other html files.
Here's my project structure. As on my post, the handlers are on the main urls.py
handler404 = 'portfolio.views.handler500'
handler500 = 'portfolio.views.handler500'
You meant
handler404 = 'portfolio.views.handler404'
handler500 = 'portfolio.views.handler500'
oh yeah. I think I already changed that to app.views.handlerX. Still getting the error. It pisses me off.
from django.views.default import page_not_found
def handler_404(request, exception):
return page_not_found(request, exception, template_name="errors/404.html")
Thank you. There's a little typo on the django.views.default. It should be django.views.defaults.
Anyway, I think it worked. The only question I think I have is if the template should be inside errors or if its ok if the template is inside the template folder together with the other html files.
No, that example is from an older project. That path to the template could be any path you want.
Got it. Thank you.