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.
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
# Erik Stein <code@classlibrary.net>, 2016
|
|
|
|
|
|
|
|
from django.contrib import admin
|
|
|
|
from django.db import models
|
|
|
|
from django.utils.translation import ugettext_lazy as _
|
|
|
|
|
|
|
|
from .models import MediaAsset
|
|
|
|
|
|
|
|
|
|
|
|
@admin.register(MediaAsset)
|
|
|
|
class MediaAssetAdmin(admin.ModelAdmin):
|
|
|
|
list_display = ['name', 'get_original_path', 'original_file_name']
|
|
|
|
|
|
|
|
def get_original_path(self, obj):
|
|
|
|
return obj.original_file.name
|
|
|
|
get_original_path.short_description = _("original path")
|