On Tue, Jan 3, 2012 at 9:46 PM, Christoph Zwerschke <[email protected]> wrote:
> Using lurl is the proper solution. But I think tgext.debugbar should also
> work with old apps or apps which are not written properly, since the error
> message you get from debugbar is hard to understand for newbies, and the
> debugbar should be as "transparent" as possible.
>
> Mounting the debugbar should of course only be done at the first call of
> render_bars().
>

You are right, making users life simpler is an important asset.
I find it a bit hackish to check and mount the controller for each
request, but as it can avoid issues to users it might be the way to
go.

> Some other ideas for refactoring (just thinking out loud):
>
> * The render_bars() function could be promoted to a method of the
> DebugBarSetupper class and cache the rendered template on the first call
> using an attribute of that class.
> * The class should then be renamed to DebugBarHooks or just DebugBar
> * Returning the response as list of html segments would be more performant
> than doing the two replace operations in render_bars()
>

Would you like to provide a patch for those? I will be more than happy
to merge it and make a new release.

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en.

Reply via email to