X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/735368cfb54c8954518179993dcd3bc55e3878e7..3768325f42689394f4639ff92e3cc483670c0d17:/apps/lessons/models.py?ds=inline diff --git a/apps/lessons/models.py b/apps/lessons/models.py index dc113ed16..412dc6bc5 100644 --- a/apps/lessons/models.py +++ b/apps/lessons/models.py @@ -16,14 +16,15 @@ class Document(models.Model): slideshare_id = models.CharField(_('slideshare ID'), blank=True, max_length=120) description = models.TextField(_('description'), blank=True) created_at = models.DateTimeField(auto_now_add=True) - + html = models.TextField(_('HTML'), blank=True) # HTML content, alternative for Flash + def slideshare_player(self): base, ext = path.splitext(self.file.name) if ext in ('.ppt', '.pps', '.pot', '.pptx', '.potx', '.ppsx', '.odp', '.key', '.zip', '.pdf',): return 'ssplayer2.swf' else: return 'ssplayerd.swf' - + class Meta: ordering = ['slug'] verbose_name, verbose_name_plural = _("document"), _("documents")