X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/e0de41ae1e67c230ad1e67f34f6f4f76e53d7234..8a94a61284f8af5f1b3aa42b2679bf4273d68169:/apps/lessons/models.py?ds=sidebyside diff --git a/apps/lessons/models.py b/apps/lessons/models.py index dc113ed16..ffb2b6c96 100644 --- a/apps/lessons/models.py +++ b/apps/lessons/models.py @@ -16,14 +16,14 @@ 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) - + 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")