Created
October 29, 2013 05:03
-
-
Save goodwillcoding/7209387 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class NoRequestParamsPredicate(object): | |
def __init__(self, val, config): | |
self.val = bool(val) | |
def text(self): | |
return 'no_request_params = %s' % self.val | |
phash = text | |
def __call__(self, context, request): | |
params_do_not_exist = len(request.params) == 0 | |
return params_do_not_exist is self.val |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment