[saem-devel] [PATCH 01 of 10 sherpa] Drop useless rgx call in URL path

Sylvain Thenault sylvain.thenault at logilab.fr
Thu Feb 23 09:32:50 CET 2017


# HG changeset patch
# User Sylvain Thénault <sylvain.thenault at logilab.fr>
# Date 1487795780 -3600
#      Wed Feb 22 21:36:20 2017 +0100
# Node ID 98432b541113a2d760bcc90c79327d16eb9d205f
# Parent  79cf56fbfb1b8b81e5fafd0a7747d9b81680697a
Drop useless rgx call in URL path

Those are not regular expression but bare string.

diff --git a/views/__init__.py b/views/__init__.py
--- a/views/__init__.py
+++ b/views/__init__.py
@@ -63,14 +63,14 @@ SedaView = jinja_static_view('seda', u'L
 IndexView = jinja_static_view('index', regid='index')
 
 
 class SherpaReqRewriter(urlrewrite.SimpleReqRewriter):
     rules = [
-        (urlrewrite.rgx('/'), dict(vid='sherpa.index')),
-        (urlrewrite.rgx('/project'), dict(vid='sherpa.project')),
-        (urlrewrite.rgx('/utilisation'), dict(vid='sherpa.utilisation')),
-        (urlrewrite.rgx('/seda'), dict(vid='sherpa.seda')),
+        ('/', dict(vid='sherpa.index')),
+        ('/project', dict(vid='sherpa.project')),
+        ('/utilisation', dict(vid='sherpa.utilisation')),
+        ('/seda', dict(vid='sherpa.seda')),
     ]
 
 
 def registration_callback(vreg):
     from cubicweb.web.views import bookmark


More information about the saem-devel mailing list