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
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 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
 | 
					
						
							|  |  |  | from .utils import UUIDMixin
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | @python_2_unicode_compatible
 | 
					
						
							|  |  |  | class MediaAsset(UUIDMixin, models.Model):
 | 
					
						
							|  |  |  |     name = models.CharField(_('name'), max_length=500)
 | 
					
						
							|  |  |  |     # TODO Add slug = SlugField
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     original_file = MediaAssetField(_("original file"))
 | 
					
						
							|  |  |  |     original_file_name = models.CharField(_('original file name'), max_length=1000, editable=False)
 | 
					
						
							|  |  |  |     # TODO Add thumbnail = Thumbnail
 | 
					
						
							|  |  |  |     # TODO Add preview = ImageSpec
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def __str__(self):
 | 
					
						
							|  |  |  |         return self.name
 |