[Cubicweb] Custom URL rewriters
sylvain.thenault at logilab.fr
Fri Sep 16 13:54:13 CEST 2011
On 16 septembre 13:04, Adrien Di Mascio wrote:
> Hi all,
> In a recent project, I've been using two custom redirect mechanisms:
> - a ``CallbackURLRewriter`` that maps a regexp to a callback
> to be called if the input url matches. In a way, it's only a
> generalization of the ``SimpleReqRewriter`` : instead of having
> a dict of properties that will update the request's form, it simply
> calls a callback with the input url, the request, and the
> regexp's MatchObject.
> - a ``GotoUrl`` object (a _really_ bad an counter-intuitive name)
> that re-enters the rewriter process with another input url.
> I think that at least the first rewriter deserves to be in CW. Any opinion ?
IMO that's things we want but should go with a cleanup/simplification of
existing rewriter, we shouldn't multiplicate url rewriters as they make
things difficult to grasp.
Sylvain Thénault LOGILAB, Paris (France)
Formations Python, Debian, Méth. Agiles: http://www.logilab.fr/formations
Développement logiciel sur mesure: http://www.logilab.fr/services
CubicWeb, the semantic web framework: http://www.cubicweb.org
More information about the Cubicweb