Back to index

plone3  3.1.7
view_source.py
Go to the documentation of this file.
00001 def getObjectSource(self, template_id=''):
00002     template = getattr(self, template_id, None)
00003     if template:
00004         self.REQUEST.RESPONSE.setHeader('content-type', 'text/plain')
00005         if hasattr(template, '_text'):
00006             return template._text
00007         if hasattr(template, 'document_src'): #dtml
00008             return template.document_src
00009     return 'source could not be rendered'