def _get_uri_from_request(request):
 uri = request.base_url
 if request.query_string:
  uri += ('?' + request.query_string.decode('utf-8'))
 return uri

def _get_uri_from_request ( request ) : uri = request . base_url if request . query_string : uri += ( '?' + request . query_string . decode ( 'utf-8' ) ) return uri
the uri returned from request .