updated the error page. also cleaned up views.py.
updated the error page. also cleaned up views.py.