# HG changeset patch # User Christophe de Vienne # Date 1442414393 -7200 # Node ID 23a62d15138226880e6d3403c4a9466abefb1dad # Parent 473754eac7c19ee273deafad8bc296946077545d Register predicates from the predicates module diff -r 473754eac7c1 -r 23a62d151382 pyramid_cubicweb/__init__.py --- a/pyramid_cubicweb/__init__.py Fri Jul 24 13:39:18 2015 +0200 +++ b/pyramid_cubicweb/__init__.py Wed Sep 16 16:39:53 2015 +0200 @@ -176,6 +176,7 @@ config.include(name) config.include('pyramid_cubicweb.tools') + config.include('pyramid_cubicweb.predicates') config.include('pyramid_cubicweb.core') if asbool(config.registry.settings.get('cubicweb.bwcompat', True)): diff -r 473754eac7c1 -r 23a62d151382 pyramid_cubicweb/predicates.py --- a/pyramid_cubicweb/predicates.py Fri Jul 24 13:39:18 2015 +0200 +++ b/pyramid_cubicweb/predicates.py Wed Sep 16 16:39:53 2015 +0200 @@ -16,3 +16,7 @@ def __call__(self, info, request): return info['match'][self.matchname].lower() in \ request.registry['cubicweb.registry'].case_insensitive_etypes + + +def includeme(config): + config.add_route_predicate('match_is_etype', MatchIsETypePredicate) diff -r 473754eac7c1 -r 23a62d151382 pyramid_cubicweb/rest_api.py --- a/pyramid_cubicweb/rest_api.py Fri Jul 24 13:39:18 2015 +0200 +++ b/pyramid_cubicweb/rest_api.py Wed Sep 16 16:39:53 2015 +0200 @@ -18,7 +18,6 @@ def includeme(config): - config.add_route_predicate('match_is_etype', MatchIsETypePredicate) config.add_route( 'cwentities', '/{etype}/*traverse', factory=ETypeResource.from_match('etype'), match_is_etype='etype')