Turbogears2 migration: custom error pages
Alessandro Molina
alessandro.molina at gmail.com
Thu Feb 18 09:56:00 UTC 2016
On Thu, Feb 18, 2016 at 10:26 AM, Thomas De Schampheleire <
patrickdepinguin at gmail.com> wrote:
>
> More ideas?
>
>
I'll try to check it today before lunch.
>
> Btw, what exactly does this:
>
> error = ErrorController()
>
> in the root controller do? This was not obvious from the docs for me.
>
Standard routing in TG works by traversing the RootController attributes,
so an url like /error/document would lead to RootController.error.document
being executed.
It should be explained by
http://turbogears.readthedocs.org/en/latest/turbogears/controllers.html if
there is hard to grasp let me know, I'll try to improve the documentation.
> And in the kallithea port we are not using this mechanism to add
> routes? How is it done instead?
The routing in Kallithea-tg first looks for a routes match, in case it's
not found it should revert to standard TG routing (
https://bitbucket.org/_amol_/kallithea-tg/src/8babf35fc56435cfd6f95203403226a9a2b14a98/kallithea/controllers/root.py?at=default&fileviewer=file-view-default#root.py-12:13
) but I have to admit that I actually didn't try to mount any subcontroller
in RootController so I'm not sure it's actually working in practice :D
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sfconservancy.org/pipermail/kallithea-general/attachments/20160218/5557f96f/attachment.html>
More information about the kallithea-general
mailing list