def renderView(self, style): """ Remembers if we're previewing or not, then implicitly calls self.renderViewContent (via Block.renderPreview) """ self.previewing = False return Block.renderView(self, style)
def renderView(self, style): """ Renders the html for export """ # Temporarily change the resources Url for exporting the images nicely cls = self.idevice.__class__ cls.export() try: html = [Block.renderView(self, style)] return u'\n '.join(html) finally: # Put everything back into the default preview mode cls.preview()