Commit 9355cdf6 authored by Nicolas Delaby's avatar Nicolas Delaby

Most of index_html implementation require at least "REQUEST" parameter.

So change method signatures to follow this convention.
Reviewed by Romain


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32012 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 89fa6f2e
...@@ -173,7 +173,7 @@ class FormPrintout(Implicit, Persistent, RoleManager, Item): ...@@ -173,7 +173,7 @@ class FormPrintout(Implicit, Persistent, RoleManager, Item):
self.template = template self.template = template
security.declareProtected('View', 'index_html') security.declareProtected('View', 'index_html')
def index_html(self, icon=0, preview=0, width=None, height=None, REQUEST=None): def index_html(self, REQUEST, icon=0, preview=0, width=None, height=None, RESPONSE=None):
"""Render and view a printout document.""" """Render and view a printout document."""
obj = getattr(self, 'aq_parent', None) obj = getattr(self, 'aq_parent', None)
...@@ -200,10 +200,8 @@ class FormPrintout(Implicit, Persistent, RoleManager, Item): ...@@ -200,10 +200,8 @@ class FormPrintout(Implicit, Persistent, RoleManager, Item):
content_type = printout_template.content_type content_type = printout_template.content_type
self.strategy = self._createStrategy(content_type) self.strategy = self._createStrategy(content_type)
printout = self.strategy.render(extra_context=extra_context) printout = self.strategy.render(extra_context=extra_context)
return self._oooConvertByFormat(printout, return self._oooConvertByFormat(printout, content_type,
content_type=content_type, extra_context, REQUEST)
extra_context=extra_context,
REQUEST=REQUEST)
security.declareProtected('View', '__call__') security.declareProtected('View', '__call__')
__call__ = index_html __call__ = index_html
...@@ -229,7 +227,7 @@ class FormPrintout(Implicit, Persistent, RoleManager, Item): ...@@ -229,7 +227,7 @@ class FormPrintout(Implicit, Persistent, RoleManager, Item):
return ODGStrategy() return ODGStrategy()
raise ValueError, 'Template type: %s is not supported' % content_type raise ValueError, 'Template type: %s is not supported' % content_type
def _oooConvertByFormat(self, printout, content_type=None, extra_context={}, REQUEST=None): def _oooConvertByFormat(self, printout, content_type, extra_context, REQUEST):
""" """
Convert the ODF document into the given format. Convert the ODF document into the given format.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment