Code update
authorThierry Florac <thierry.florac@onf.fr>
Fri, 25 May 2018 08:07:03 +0200
changeset 33 c8d86f2bd778
parent 32 f0b28eb0bdf0
child 34 39403a095ad4
Code update
src/pyams_default_theme/page.py
--- a/src/pyams_default_theme/page.py	Fri May 25 08:06:38 2018 +0200
+++ b/src/pyams_default_theme/page.py	Fri May 25 08:07:03 2018 +0200
@@ -40,8 +40,8 @@
 
     def __init__(self, context, request):
         super(PreviewPage, self).__init__(context, request)
-        self.language = self.request.params.get('lang')
-        self.renderers = sorted(self.request.registry.getAdapters((self.context, self.request), IContentRenderer),
+        self.language = request.params.get('lang')
+        self.renderers = sorted(request.registry.getAdapters((context, request), IContentRenderer),
                                 key=lambda x: getattr(x[1], 'weight', 0))
 
     def update(self):