Commit 2c5ca01c authored by Yusei Tahara's avatar Yusei Tahara

implement getMimeTypeAndContent method.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@21226 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e31e99d1
...@@ -201,3 +201,8 @@ class TextDocument(Document, TextContent): ...@@ -201,3 +201,8 @@ class TextDocument(Document, TextContent):
is equivalent to having some text_content. is equivalent to having some text_content.
""" """
return self.hasTextContent() return self.hasTextContent()
security.declareProtected(Permissions.AccessContentsInformation, 'getMimeTypeAndContent')
def getMimeTypeAndContent(self):
"""This method returns a tuple which contains mimetype and content."""
return (self.getTextFormat(), self.getTextContent())
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