If you dont have 404.html file, than Django will raise exception that 404.html is not found. Next, if you dont have 500.html your exception is generating new exception on lack of 500.html. Make sure you have both files. Eg:
$ touch templates/{404,500}.html -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/WcUacZ3x9nYJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.