(request)
return request_data
Function returns the dictionary which contains the data of request object.
    :Parameter request:
            Object of HttpRequest

    :Return request_data:
            Dict containing the request data
Function returns the dictionary which contains the data of request object.
    :Parameter request:
            Object of HttpRequest
Function returns the dictionary which contains the data of request object . : Parameter request : Object of HttpRequest
def request_as_dict(request):
    """
    Function returns the dictionary which contains the data of request object.
    :Parameter request:
            Object of HttpRequest

    :Return request_data:
            Dict containing the request data
    """

    # This is a parameter that is provided by middleware that may or may not exist
    can_access_all_locations = getattr(request, 'can_access_all_locations', False)

    request_data = dict(
        GET=request.GET if request.method == 'GET' else request.POST,
        META=dict(
            QUERY_STRING=request.META.get('QUERY_STRING'),
            PATH_INFO=request.META.get('PATH_INFO')
        ),
        datespan=request.datespan,
        couch_user=None,
        can_access_all_locations=can_access_all_locations
    )

    try:
        request_data.update(couch_user=request.couch_user.get_id)
    except Exception as e:
        logging.error("Could not pickle the couch_user id from the request object. Error: %s" % e)

    return request_data
def request_as_dict ( request ) : # This is a parameter that is provided by middleware that may or may not exist can_access_all_locations = getattr ( request , 'can_access_all_locations' , False ) request_data = dict ( GET = request . GET if request . method == 'GET' else request . POST , META = dict ( QUERY_STRING = request . META . get ( 'QUERY_STRING' ) , PATH_INFO = request . META . get ( 'PATH_INFO' ) ) , datespan = request . datespan , couch_user = None , can_access_all_locations = can_access_all_locations ) try : request_data . update ( couch_user = request . couch_user . get_id ) except Exception as e : logging . error ( "Could not pickle the couch_user id from the request object. Error: %s" % e ) return request_data