Commit 8c28173b authored by Jean Michel Rouly's avatar Jean Michel Rouly
Browse files

Added error handling views.

parent 9a6ab6b7
......@@ -15,6 +15,18 @@ def is_registered( user ):
except RegisteredUser.DoesNotExist:
return False
# Error 404
def error_404(request):
return render(request, '404.html', {
},
)
# Error 500
def error_500(request):
return render(request, '500.html', {
},
)
# Homepage view.
@login_required
def index(request):
......
......@@ -3,6 +3,9 @@ from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
handle404 = "error_404"
handle500 = "error_500"
urlpatterns = patterns('go.views',
# / - Homepage url.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment