aboutsummaryrefslogtreecommitdiffstats
path: root/alphabetlearning/resources/admin.py
diff options
context:
space:
mode:
Diffstat (limited to 'alphabetlearning/resources/admin.py')
-rw-r--r--alphabetlearning/resources/admin.py39
1 files changed, 39 insertions, 0 deletions
diff --git a/alphabetlearning/resources/admin.py b/alphabetlearning/resources/admin.py
new file mode 100644
index 0000000..b0e08dc
--- /dev/null
+++ b/alphabetlearning/resources/admin.py
@@ -0,0 +1,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"]