[PATCH 4 of 9 seda] [views] Ignore base class rule in custom req rewriter

Sylvain Thenault sylvain.thenault at logilab.fr
Wed Mar 1 12:31:46 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 dd48a3b0eea1a36d22153f18fa6f14434fce64d4
# Parent  6702fe186f21d204da135964c2a1cee64b933038
[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