def etag_request_processor(page, request):
 class DummyResponse(dict, ):
  u'\n        This is a dummy class with enough behaviour of HttpResponse so we\n        can use the condition decorator without too much pain.\n        '
  def has_header(page, what):
   return False
 def dummy_response_handler(*args, **kwargs):
  return DummyResponse()
 def etagger(request, page, *args, **kwargs):
  etag = page.etag(request)
  return etag
 def lastmodifier(request, page, *args, **kwargs):
  lm = page.last_modified()
  return lm
 from django.views.decorators.http import condition
 rsp = condition(etag_func=etagger, last_modified_func=lastmodifier)(dummy_response_handler)(request, page)
 if (not isinstance(rsp, DummyResponse)):
  return rsp

def etag_request_processor ( page , request ) : class DummyResponse ( dict , ) : def has_header ( page , what ) : return False def dummy_response_handler ( * args , ** kwargs ) : return DummyResponse ( ) def etagger ( request , page , * args , ** kwargs ) : etag = page . etag ( request ) return etag def lastmodifier ( request , page , * args , ** kwargs ) : lm = page . last_modified ( ) return lm from django . views . decorators . http import condition rsp = condition ( etag_func = etagger , last_modified_func = lastmodifier ) ( dummy_response_handler ) ( request , page ) if ( not isinstance ( rsp , DummyResponse ) ) : return rsp
short-circuits the request-response cycle if the etag matches .