From a7c19a5da02cd8b1f686039d418cb1ddb587b973 Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Mon, 14 Oct 2024 15:35:44 -0700 Subject: [PATCH] add register_admin to abx hookspec --- archivebox/abx/django/hookspec.py | 5 +++++ archivebox/abx/django/use.py | 3 +++ 2 files changed, 8 insertions(+) diff --git a/archivebox/abx/django/hookspec.py b/archivebox/abx/django/hookspec.py index 04bb359b..87f8e520 100644 --- a/archivebox/abx/django/hookspec.py +++ b/archivebox/abx/django/hookspec.py @@ -110,6 +110,11 @@ def register_checks(): """Register django checks with django system checks system""" pass +@hookspec +def register_admin(admin_site): + """Register django admin views/models with the main django admin site instance""" + pass + ########################################################################################### diff --git a/archivebox/abx/django/use.py b/archivebox/abx/django/use.py index 87d3f9bd..a52ada3b 100644 --- a/archivebox/abx/django/use.py +++ b/archivebox/abx/django/use.py @@ -96,3 +96,6 @@ def register_checks(): """register any django system checks""" pm.hook.register_checks() +def register_admin(admin_site): + """register any django admin models/views with the main django admin site instance""" + pm.hook.register_admin(admin_site=admin_site)