Skip to content
Browse files

Merge branch 'contextual-panels' of github.com:Pylons/pyramid_layout …

…into contextual-panels
  • Loading branch information...
2 parents 1611ce8 + a022433 commit 63eef572e4873b9a39e7f03c7c9c19e0daceb7ed @chrisrossi chrisrossi committed Jul 29, 2013
Showing with 4 additions and 2 deletions.
  1. +4 −2 pyramid_layout/layout.py
View
6 pyramid_layout/layout.py
@@ -51,9 +51,11 @@ def render_panel(self, name='', *args, **kw):
context, request and any additional parameters passed into the
`render_panel` call. In case a panel isn't found, `None` is returned.
"""
- context = kw.get('context', None) or self.context
- if kw.get('context', None):
+ context = kw.get('context', None)
+ if context:
del kw['context']
+ else:
+ context = self.context
request = self.request
adapters = request.registry.adapters
panel = adapters.lookup((providedBy(context),), IPanel, name=name)

0 comments on commit 63eef57

Please sign in to comment.
Something went wrong with that request. Please try again.