aboutsummaryrefslogblamecommitdiffstats
path: root/pyblackbird_cc/resources/admin.py
blob: ac45efb9367139370db51a6d4d94ed370a588b35 (plain) (tree)
1
2
3
4
                            

                                
                                                                                                       











                                                            
 
 

                                                 

                       



                                      









                                                         
# Register your models here.
from django.contrib import admin

from pyblackbird_cc.resources.models import Resource, ResourceSubcategory, PDFPageSnapshot, PDFResource
from pyblackbird_cc.resources.models import ResourceCategory
from pyblackbird_cc.resources.models import ResourceType


@admin.register(ResourceType)
class ResourceTypeAdmin(admin.ModelAdmin):
    pass


@admin.register(ResourceCategory)
class ResourceCategoryAdmin(admin.ModelAdmin):
    pass


@admin.register(ResourceSubcategory)
class ResourceSubcategoryAdmin(admin.ModelAdmin):
    ordering = ['name']


@admin.register(Resource)
class ResourceAdmin(admin.ModelAdmin):
    pass


@admin.register(PDFResource)
class PDFResourceAdmin(admin.ModelAdmin):
    list_display = ["resource", "file_name", "file_size"]


@admin.register(PDFPageSnapshot)
class PDFPageSnapshotAdmin(admin.ModelAdmin):
    list_display = ["file_name", "pdf_file"]