forked from 0x2620/pandora
24 lines
629 B
Python
24 lines
629 B
Python
# -*- coding: utf-8 -*-
|
|
from __future__ import division, print_function, absolute_import
|
|
|
|
from django.contrib import admin
|
|
|
|
from . import models
|
|
|
|
|
|
class FileAdmin(admin.ModelAdmin):
|
|
search_fields = ['path', 'oshash', 'video_codec']
|
|
list_display = ['available', 'wanted', 'selected', '__str__', 'public_id']
|
|
list_display_links = ('__str__', )
|
|
|
|
def public_id(self, obj):
|
|
return '%s' % (obj.item.public_id)
|
|
|
|
|
|
admin.site.register(models.File, FileAdmin)
|
|
|
|
|
|
class InstanceAdmin(admin.ModelAdmin):
|
|
search_fields = ['path', 'volume__name', 'file__oshash']
|
|
|
|
admin.site.register(models.Instance, InstanceAdmin)
|