Jun 30, 2011

Request useful methods

request.path # the full path, not including the domain "/hello/" but including the leading slash 
request.get_host() # the host (i.e., the “domain,” in common "127.0.0.1:8000" or parlance) "www.example.com"
request.get_full_path() # the path, plus a query string (if available) "/hello/?print=true"
request.is_secure() # True if the request was made via HTTPS; True or False otherwise, False 

No comments: