Work in progress: django-imagekit but for all types of media files (movies, PDFs etc.). + private media
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
714 B

9 years ago
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _
from ..medialibrary.fields import MediaAssetField, MEDIA_ASSET_STORAGE
from .utils import UUIDMixin
9 years ago
@python_2_unicode_compatible
9 years ago
class MediaAsset(UUIDMixin, models.Model):
9 years ago
name = models.CharField(_('name'), max_length=50)
# TODO Add slug = SlugField
storage = MEDIA_ASSET_STORAGE
original_file = MediaAssetField(_("original file"), storage=MEDIA_ASSET_STORAGE)
# TODO Add thumbnail = Thumbnail
# TODO Add preview = ImageSpec
9 years ago
def __str__(self):
return self.name