def detect_mobile(view):
 def detected(request, *args, **kwargs):
  Middleware.process_request(request)
  return view(request, *args, **kwargs)
 detected.__doc__ = ('%s\n[Wrapped by detect_mobile which detects if the request is from a phone]' % view.__doc__)
 return detected

def detect_mobile ( view ) : def detected ( request , * args , ** kwargs ) : Middleware . process_request ( request ) return view ( request , * args , ** kwargs ) detected . __doc__ = ( '%s\n[Wrapped by detect_mobile which detects if the request is from a phone]' % view . __doc__ ) return detected
view decorator that adds a "mobile" attribute to the request which is true or false depending on whether the request should be considered to come from a small-screen device such as a phone or a pda .