diff options
-rw-r--r-- | pyblackbird_cc/resources/admin.py | 12 | ||||
-rw-r--r-- | pyblackbird_cc/resources/models.py | 4 |
2 files changed, 15 insertions, 1 deletions
diff --git a/pyblackbird_cc/resources/admin.py b/pyblackbird_cc/resources/admin.py index a9662ee..ac45efb 100644 --- a/pyblackbird_cc/resources/admin.py +++ b/pyblackbird_cc/resources/admin.py @@ -1,7 +1,7 @@ # Register your models here. from django.contrib import admin -from pyblackbird_cc.resources.models import Resource, ResourceSubcategory +from pyblackbird_cc.resources.models import Resource, ResourceSubcategory, PDFPageSnapshot, PDFResource from pyblackbird_cc.resources.models import ResourceCategory from pyblackbird_cc.resources.models import ResourceType @@ -24,3 +24,13 @@ class ResourceSubcategoryAdmin(admin.ModelAdmin): @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"] diff --git a/pyblackbird_cc/resources/models.py b/pyblackbird_cc/resources/models.py index 31085c0..f938cb4 100644 --- a/pyblackbird_cc/resources/models.py +++ b/pyblackbird_cc/resources/models.py @@ -152,6 +152,7 @@ class PDFResource(models.Model): file_size = models.IntegerField(null=False) class Meta: + verbose_name_plural = "PDF Resources" unique_together = ("resource", "file_name") def __str__(self): @@ -171,5 +172,8 @@ class PDFPageSnapshot(models.Model): related_name="pdf_page_snapshots", ) + class Meta: + verbose_name_plural = "PDF Page Snapshots" + def __str__(self): return self.name |