Turbogears2 migration: custom error pages
Thomas De Schampheleire
patrickdepinguin at gmail.com
Thu Feb 18 15:13:10 UTC 2016
On Thu, Feb 18, 2016 at 12:42 PM, Alessandro Molina
<alessandro.molina at gmail.com> wrote:
>
>
> On Thu, Feb 18, 2016 at 12:05 PM, Thomas De Schampheleire
> <patrickdepinguin at gmail.com> wrote:
>>
>> Thanks, for basic 404 it indeed works.
>> However, I discovered at least one scenario where it does not:
>
>
> Thanks for pointing that out.
> The reason is that when dispatching errors we do not pass through the
> middleware stack again, so RoutesMiddleware is not executed again and the
> routes dict remains the same as before. This causes our RootController to
> dispatch it again to the same route as before which leads to a 404 error
> again.
>
> I provided a work-around in
> https://bitbucket.org/_amol_/kallithea-tg/commits/5ec7001cd47dece91580d8d533bacf3f0ab0d990
> but probably the "correct" solution would be to remove RoutesMiddleware and
> perform the route resolution inside RootController so that the route is
> resolved every time we perform a dispatch and not only when receiving a
> request from the WSGI server.
So this means that Kallithea would start using the 'default' routing
method used by Turbogears projects?
Is this a big impact / does it require a lot of work, according to you?
Thanks,
Thomas
More information about the kallithea-general
mailing list