Exemplo n.º 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'}
Exemplo n.º 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'}
Exemplo n.º 3
0
 def get_all_attached_files_data(self):
     files = list(self.attached_files)
     files.append(self.image)
     return get_files_data(files)
Exemplo n.º 4
0
 def get_attached_files_data(self):
     return get_files_data(self.attached_files)
Exemplo n.º 5
0
 def get_attached_files_data(self):
     return get_files_data(self.attached_files)
Exemplo n.º 6
0
 def get_all_attached_files_data(self):
     files = list(self.attached_files)
     files.append(self.image)
     return get_files_data(files)