web/views/urlrewrite.py
branchtls-sprint
changeset 722 50a99184cf47
parent 712 ce49e3885453
child 1132 96752791c2b6
equal deleted inserted replaced
721:f76e89b52553 722:50a99184cf47
     1 """Rules based url rewriter component, to get configurable RESTful urls
     1 """Rules based url rewriter component, to get configurable RESTful urls
     2 
     2 
     3 :organization: Logilab
     3 :organization: Logilab
     4 :copyright: 2007-2008 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
     4 :copyright: 2007-2009 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
     5 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
     5 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
     6 """
     6 """
     7 import re
     7 import re
     8 
     8 
       
     9 from cubicweb.appobject import AppObject
     9 from cubicweb.common.registerers import accepts_registerer
    10 from cubicweb.common.registerers import accepts_registerer
    10 from cubicweb.common.appobject import AppObject
       
    11 
    11 
    12 
    12 
    13 def rgx(pattern, flags=0):
    13 def rgx(pattern, flags=0):
    14     """this is just a convenient shortcout to add the $ sign"""
    14     """this is just a convenient shortcout to add the $ sign"""
    15     return re.compile(pattern+'$', flags)
    15     return re.compile(pattern+'$', flags)