Skip to content

Wrap panel process_view requests to allow multiple panels to hook without calling the view multiple times #204

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

Closed
wants to merge 1 commit into from

Conversation

theojulienne
Copy link

Currently if a process_view handler in a panel calls the view function and returns something, the output is silently ignored. This means a view can be called multiple times.

This patch wraps each process_view handler up so the view is only ever called once - if any one handler returns something other than None, it is passed on to Django.

@thinred
Copy link

thinred commented Sep 28, 2011

This is essentially true, but I have read the 'process_view' of all panels and they do not execute the view at all. Do you have a test case for that? Otherwise there is no reason to wrap the view function.

@theojulienne
Copy link
Author

ProfilingDebugPanel uses process_view. As soon as you add that panel, views are called twice. Third party panels can also use process_view, and each one that did would call the view a third, fourth, ... time.

@mitar
Copy link

mitar commented Jan 30, 2012

Ticket #209 seems to be duplicate of this ticket.

@jezdez
Copy link
Contributor

jezdez commented Jun 26, 2012

I think this has been fixed in c9d3f34.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants