[PATCH 04 of 10 seda] [views] Ignore base class rule in custom req rewriter

Sylvain Thenault sylvain.thenault at logilab.fr
Tue Mar 7 15:25:41 CET 2017


# HG changeset patch
# User Sylvain Thénault <sylvain.thenault at logilab.fr>
# Date 1488318009 -3600
#      Tue Feb 28 22:40:09 2017 +0100
# Node ID 4a982f5292059b97fc744a49528d076d9e0dcd72
# Parent  1025002a11d620bc89a9d358294faf19d7bc0428
[views] Ignore base class rule in custom req rewriter

else we ends up evaluating cw's default rule several time, while in our case we
only want to test our own rules.

diff --git a/cubicweb_seda/views/sedalib.py b/cubicweb_seda/views/sedalib.py
--- a/cubicweb_seda/views/sedalib.py
+++ b/cubicweb_seda/views/sedalib.py
@@ -19,10 +19,11 @@ from cubicweb.predicates import (is_inst
                                  has_related_entities, relation_possible)
 from cubicweb.web.views import basecomponents, baseviews, ibreadcrumbs, urlrewrite
 
 
 class SEDAReqRewriter(urlrewrite.SimpleReqRewriter):
+    ignore_baseclass_rules = True
     rules = [
         ('/sedalib', dict(rql='Any X WHERE X is SEDAArchiveUnit, '
                               'NOT X seda_archive_unit P',
                           vid='seda.sedalib')),
     ]


More information about the saem-devel mailing list