Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

- The ``render_view`` method of ``pyramid.renderers.RendererHelper`` …

…passed

  an incorrect value into the renderer for ``renderer_info``.  It now passes
  an instance of ``RendererHelper`` instead of a dictionary, which is
  consistent with other usages.  See
  https://github.com/Pylons/pyramid/issues#issue/106

Closes #106
  • Loading branch information...
commit 877904ac1b192191b0bdac4f7e4e1cd6d5f27884 1 parent a87a68d
Chris McDonough mcdonc authored
6 CHANGES.txt
View
@@ -19,6 +19,12 @@ Bug Fixes
start when ``paster serve development.ini`` was used against the result.
See https://github.com/Pylons/pyramid/issues/#issue/107
+- The ``render_view`` method of ``pyramid.renderers.RendererHelper`` passed
+ an incorrect value into the renderer for ``renderer_info``. It now passes
+ an instance of ``RendererHelper`` instead of a dictionary, which is
+ consistent with other usages. See
+ https://github.com/Pylons/pyramid/issues#issue/106
+
1.0b1 (2011-01-21)
==================
2  pyramid/renderers.py
View
@@ -286,7 +286,7 @@ def render_view(self, request, response, view, context):
system = {
'view':view,
'renderer_name':self.name, # b/c
- 'renderer_info':{'name':self.name, 'package':self.package},
+ 'renderer_info':self,
'context':context,
'request':request
}
18 pyramid/tests/test_renderers.py
View
@@ -334,6 +334,24 @@ def test_render_to_response(self):
request=request)
self.assertEqual(response.body, ('values', 'system_values'))
+ def test_render_view(self):
+ self._registerRendererFactory()
+ request = Dummy()
+ helper = self._makeOne('loo.foo')
+ view = 'view'
+ context = 'context'
+ request = testing.DummyRequest()
+ response = 'response'
+ response = helper.render_view(request, response, view, context)
+ self.assertEqual(response.body,
+ ('response',
+ {'renderer_info': helper,
+ 'renderer_name': 'loo.foo',
+ 'request': request,
+ 'context': 'context',
+ 'view': 'view'})
+ )
+
def test_render_explicit_registry(self):
factory = self._registerRendererFactory()
class DummyRegistry(object):
Please sign in to comment.
Something went wrong with that request. Please try again.