-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to get the the 'view' global renderer variable in the panel #29
Comments
Hi George, I assume this is because there is some helper method on a class based view Panels can also accept arbitrary keyword arguments, so you could always Chris On Mon, Jun 23, 2014 at 7:33 AM, geohuz [email protected] wrote:
|
Thanks Chris, now I have another issue to get the current panel callable name, basically I want to display the function or callable name in the page, when I use panel renderer variable, it displays something like bound method LayoutManager.render_panel of <pyramid_layout.layout.LayoutManager object at 0x10950d3d0 |
Hi George, I goofed. 'panel' is the render_panel callable used to render panels inside of a template. It is not the panel currently being rendered. I would suggest looking for a different way to get that information into your page. Sorry for the confusion. |
I changed the source code in config.py, the function add_renderer_globals to this:
I'm not sure if this is the best way to fix my problem, but it works. |
I found in the panel template there is no 'view' renderer global variable there, I was trying to get it through the introspectable but failed. Is there an easy way to get it?
The text was updated successfully, but these errors were encountered: