Skip to content

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

Closed
theojulienne wants to merge 1 commit into
django-commons:masterfrom
theojulienne:master
Closed

Wrap panel process_view requests to allow multiple panels to hook without calling the view multiple times#204
theojulienne wants to merge 1 commit into
django-commons:masterfrom
theojulienne:master

Conversation

@theojulienne

Copy link
Copy Markdown

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

thinred commented Sep 28, 2011

Copy link
Copy Markdown

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
Copy Markdown
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

mitar commented Jan 30, 2012

Copy link
Copy Markdown

Ticket #209 seems to be duplicate of this ticket.

@jezdez

jezdez commented Jun 26, 2012

Copy link
Copy Markdown
Contributor

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