Skip to content

Instantly share code, notes, and snippets.

@pminkov
Created November 12, 2011 03:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pminkov/1359984 to your computer and use it in GitHub Desktop.
Save pminkov/1359984 to your computer and use it in GitHub Desktop.
View for http simulate.
from django.shortcuts import render_to_response
from django.http import HttpResponse
import middleware
def main(request):
response = HttpResponse()
middleware.IN_ERROR_MODE = not middleware.IN_ERROR_MODE
response.write('Error mode = ' + str(middleware.IN_ERROR_MODE))
return response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment