Skip to content

Instantly share code, notes, and snippets.

@chriskief
Created March 28, 2014 21:00
Show Gist options
  • Save chriskief/9842903 to your computer and use it in GitHub Desktop.
Save chriskief/9842903 to your computer and use it in GitHub Desktop.
from django.views.generic import TemplateView
if settings.DEBUG:
# enable local preview of error pages
urlpatterns += patterns('',
(r'^403/$', TemplateView.as_view(template_name="403.html")),
(r'^404/$', TemplateView.as_view(template_name="404.html")),
(r'^500/$', TemplateView.as_view(template_name="500.html")),
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment