equal
deleted
inserted
replaced
1487 |
1487 |
1488 def _values_set(self, cls, req, **kwargs): |
1488 def _values_set(self, cls, req, **kwargs): |
1489 return frozenset(req.form) |
1489 return frozenset(req.form) |
1490 |
1490 |
1491 |
1491 |
|
1492 class match_http_method(ExpectedValuePredicate): |
|
1493 """Return non-zero score if one of the HTTP methods specified as |
|
1494 initializer arguments is the HTTP method of the request (GET, POST, ...). |
|
1495 """ |
|
1496 |
|
1497 def __call__(self, cls, req, **kwargs): |
|
1498 return int(req.http_method() in self.expected) |
|
1499 |
|
1500 |
1492 class match_edited_type(ExpectedValuePredicate): |
1501 class match_edited_type(ExpectedValuePredicate): |
1493 """return non-zero if main edited entity type is the one specified as |
1502 """return non-zero if main edited entity type is the one specified as |
1494 initializer argument, or is among initializer arguments if `mode` == 'any'. |
1503 initializer argument, or is among initializer arguments if `mode` == 'any'. |
1495 """ |
1504 """ |
1496 |
1505 |