(self, request)
return since
Returns parsed "since" GET parameter
Returns parsed "since" GET parameter
Returns parsed since GET parameter
def get_since(self, request):
        """Returns parsed "since" GET parameter"""
        since_ = request.GET.get("since", None)

        if since_ is None:
            raise RequestException("parameter 'since' missing")

        try:
            since_ = int(since_)
            since = datetime.fromtimestamp(since_)
        except ValueError:
            raise RequestException("'since' is not a valid timestamp")

        if since_ < 0:
            raise RequestException("'since' must be a non-negative number")

        return since
def get_since ( self , request ) : since_ = request . GET . get ( "since" , None ) if since_ is None : raise RequestException ( "parameter 'since' missing" ) try : since_ = int ( since_ ) since = datetime . fromtimestamp ( since_ ) except ValueError : raise RequestException ( "'since' is not a valid timestamp" ) if since_ < 0 : raise RequestException ( "'since' must be a non-negative number" ) return since