From b3d46f2ddbd7312e731e8a05e09a8b547439b2ff Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Mon, 29 Jul 2024 17:06:29 +0100 Subject: wip: Adds a new model for additional categories - Adds new ResourceSubcategory - Uses this for choices= in the Resource form (create) - Adds this new model to the admin Doesn't validate in the edit form yet, --- pyblackbird_cc/resources/admin.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'pyblackbird_cc/resources/admin.py') diff --git a/pyblackbird_cc/resources/admin.py b/pyblackbird_cc/resources/admin.py index 302f5ca..b885caf 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 +from pyblackbird_cc.resources.models import Resource, ResourceSubcategory from pyblackbird_cc.resources.models import ResourceCategory from pyblackbird_cc.resources.models import ResourceType @@ -15,6 +15,9 @@ class ResourceTypeAdmin(admin.ModelAdmin): class ResourceCategoryAdmin(admin.ModelAdmin): pass +@admin.register(ResourceSubcategory) +class ResourceSubcategoryAdmin(admin.ModelAdmin): + pass @admin.register(Resource) class ResourceAdmin(admin.ModelAdmin): -- cgit v1.2.3