web/views/urlpublishing.py
branchtls-sprint
changeset 661 4f61eb8a96b7
parent 0 b97547f5f1fa
child 1802 d628defebc17
equal deleted inserted replaced
660:5233a9457f6b 661:4f61eb8a96b7
    16 
    16 
    17 XXX actionpath and folderpath execute a query whose results is lost
    17 XXX actionpath and folderpath execute a query whose results is lost
    18 because of redirecting instead of direct traversal
    18 because of redirecting instead of direct traversal
    19 
    19 
    20 :organization: Logilab
    20 :organization: Logilab
    21 :copyright: 2001-2008 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
    21 :copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
    22 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
    22 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
    23 """
    23 """
    24 
    24 
    25 __docformat__ = "restructuredtext en"
    25 __docformat__ = "restructuredtext en"
    26 
    26 
    27 from rql import TypeResolverException
    27 from rql import TypeResolverException
    28 
    28 
    29 from cubicweb import RegistryException, typed_eid
    29 from cubicweb import RegistryException, typed_eid
    30 from cubicweb.web import NotFound, Redirect
    30 from cubicweb.web import NotFound, Redirect
    31 from cubicweb.web.component import SingletonComponent, Component
    31 from cubicweb.web.component import Component, Component
    32 
    32 
    33 
    33 
    34 class PathDontMatch(Exception):
    34 class PathDontMatch(Exception):
    35     """exception used by url evaluators to notify they can't evaluate
    35     """exception used by url evaluators to notify they can't evaluate
    36     a path
    36     a path
    37     """
    37     """
    38     
    38     
    39 class URLPublisherComponent(SingletonComponent):
    39 class URLPublisherComponent(Component):
    40     """associate url's path to view identifier / rql queries,
    40     """associate url's path to view identifier / rql queries,
    41     by applying a chain of urlpathevaluator components.
    41     by applying a chain of urlpathevaluator components.
    42 
    42 
    43     An evaluator is a URLPathEvaluator subclass with a .evaluate_path
    43     An evaluator is a URLPathEvaluator subclass with a .evaluate_path
    44     method taking the request object and the path to publish as
    44     method taking the request object and the path to publish as