Designing custom 404 and 500 error pages in Django

Update 1: Please refer this updated article for Django 2.0 and source code.

 

It happens very frequently that a visitor on your website typed a wrong URL or the page user is looking for no longer exists. What do you do to handle such cases.

You have three options.

  • Redirect the visitor to home page, silently.
  • Show a boring 404 page and then ask them to click on a link.
  • Create your own funny/awesome/informative custom 404 error page.

In this article we will discuss the third option.

Continue reading “Designing custom 404 and 500 error pages in Django”