diff options
author | Matthew Lemon <y@yulqen.org> | 2024-07-29 17:06:29 +0100 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-07-29 17:06:29 +0100 |
commit | b3d46f2ddbd7312e731e8a05e09a8b547439b2ff (patch) | |
tree | 70fc0e4487dee1ee2f2febf083f35a7a0a38721e /pyblackbird_cc/resources/admin.py | |
parent | 914fb4dd4ab8b7e37c67de01d6a42802999553c1 (diff) |
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,
Diffstat (limited to 'pyblackbird_cc/resources/admin.py')
-rw-r--r-- | pyblackbird_cc/resources/admin.py | 5 |
1 files changed, 4 insertions, 1 deletions
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): |