예제 #1
0
    def _extract_content(self):
        if self.picture:
            result = get_files_data([self.picture])
            if result:
                return result[0]

        html_content = getattr(self, 'html_content', '')
        if html_content:
            return {'content': html_content, 'type': 'html'}

        return {'content': '', 'type': 'none'}
예제 #2
0
    def _extract_content(self):
        if self.picture:
            result = get_files_data([self.picture])
            if result:
                return result[0]

        html_content = getattr(self, 'html_content', '')
        if html_content:
            return {'content': html_content,
                    'type': 'html'}

        return {'content': '',
                'type': 'none'}
예제 #3
0
 def get_all_attached_files_data(self):
     files = list(self.attached_files)
     files.append(self.image)
     return get_files_data(files)
예제 #4
0
 def get_attached_files_data(self):
     return get_files_data(self.attached_files)
예제 #5
0
 def get_attached_files_data(self):
     return get_files_data(self.attached_files)
예제 #6
0
 def get_all_attached_files_data(self):
     files = list(self.attached_files)
     files.append(self.image)
     return get_files_data(files)