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.
23 lines
714 B
23 lines
714 B
# -*- 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 |
|
|
|
|
|
@python_2_unicode_compatible |
|
class MediaAsset(UUIDMixin, models.Model): |
|
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 |
|
|
|
def __str__(self): |
|
return self.name
|
|
|