Skip to content

Instantly share code, notes, and snippets.

@victorono
Created May 26, 2014 17:12
Show Gist options
  • Select an option

  • Save victorono/88da3b052f3d4b73afa8 to your computer and use it in GitHub Desktop.

Select an option

Save victorono/88da3b052f3d4b73afa8 to your computer and use it in GitHub Desktop.
Page erro 404, 500 django
from django.shortcuts import render_to_response
def error_404(request):
response = render_to_response("web/error_404.html")
response.status_code = 404
return response
def error_500(request):
response = render_to_response("web/error_500.html")
response.status_code = 500
return response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment