From b852442efcc8230bf410eb485bf5402c5d74e3ee Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Sun, 17 Nov 2024 22:57:20 -0800 Subject: [PATCH] add crawls app back to django admin --- archivebox/api/v1_api.py | 1 + archivebox/queues/__init__.py | 8 ++++++++ archivebox/queues/apps.py | 7 ------- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/archivebox/api/v1_api.py b/archivebox/api/v1_api.py index 7cbe3f1f..61a7aafc 100644 --- a/archivebox/api/v1_api.py +++ b/archivebox/api/v1_api.py @@ -39,6 +39,7 @@ html_description=f''' def register_urls(api: NinjaAPI) -> NinjaAPI: api.add_router('/auth/', 'api.v1_auth.router') api.add_router('/core/', 'api.v1_core.router') + api.add_router('/crawls/', 'api.v1_core.router') api.add_router('/cli/', 'api.v1_cli.router') api.add_router('/jobs/', 'api.v1_actors.router') return api diff --git a/archivebox/queues/__init__.py b/archivebox/queues/__init__.py index e69de29b..24e8643f 100644 --- a/archivebox/queues/__init__.py +++ b/archivebox/queues/__init__.py @@ -0,0 +1,8 @@ +__package__ = 'archivebox.queues' + +import abx + +@abx.hookimpl +def register_admin(admin_site): + from queues.admin import register_admin + register_admin(admin_site) diff --git a/archivebox/queues/apps.py b/archivebox/queues/apps.py index 4a83d483..4811fab1 100644 --- a/archivebox/queues/apps.py +++ b/archivebox/queues/apps.py @@ -1,14 +1,7 @@ from django.apps import AppConfig -import abx - class QueuesConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'queues' - -@abx.hookimpl -def register_admin(admin_site): - from queues.admin import register_admin - register_admin(admin_site)