blob: b0e08dc9938eb2ffc76226e3e27257068c20dea1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# Register your models here.
from django.contrib import admin
from alphabetlearning.resources.models import PDFPageSnapshot
from alphabetlearning.resources.models import PDFResource
from alphabetlearning.resources.models import Resource
from alphabetlearning.resources.models import ResourceCategory
from alphabetlearning.resources.models import ResourceSubcategory
from alphabetlearning.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"]
|