2010-07-12 14:56:14 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
2016-08-23 10:27:06 +00:00
|
|
|
from __future__ import division, print_function, absolute_import
|
2010-07-12 14:56:14 +00:00
|
|
|
|
|
|
|
from django.contrib import admin
|
|
|
|
|
2016-08-23 10:27:06 +00:00
|
|
|
from . import models
|
2010-07-12 14:56:14 +00:00
|
|
|
|
2011-01-01 11:44:42 +00:00
|
|
|
|
2010-07-12 14:56:14 +00:00
|
|
|
class FileAdmin(admin.ModelAdmin):
|
2016-07-01 15:41:53 +00:00
|
|
|
search_fields = ['path', 'oshash', 'video_codec']
|
2017-04-15 10:28:11 +00:00
|
|
|
list_display = ['available', 'wanted', 'selected', '__str__', 'public_id']
|
|
|
|
list_display_links = ('__str__', )
|
2010-07-12 14:56:14 +00:00
|
|
|
|
2014-09-19 12:26:46 +00:00
|
|
|
def public_id(self, obj):
|
2016-07-01 15:41:53 +00:00
|
|
|
return '%s' % (obj.item.public_id)
|
2010-12-23 07:55:44 +00:00
|
|
|
|
2010-07-12 14:56:14 +00:00
|
|
|
|
|
|
|
admin.site.register(models.File, FileAdmin)
|
|
|
|
|
2011-01-01 11:44:42 +00:00
|
|
|
|
2010-11-08 17:43:59 +00:00
|
|
|
class InstanceAdmin(admin.ModelAdmin):
|
2011-10-15 15:21:41 +00:00
|
|
|
search_fields = ['path', 'volume__name', 'file__oshash']
|
2010-07-12 14:56:14 +00:00
|
|
|
|
2010-11-08 17:43:59 +00:00
|
|
|
admin.site.register(models.Instance, InstanceAdmin)
|