Bläddra i källkod

move serve_static and shell_welcome_message into misc

Nick Sweeting 1 år sedan
förälder
incheckning
9a04ed7c76

+ 1 - 1
archivebox/core/settings.py

@@ -410,7 +410,7 @@ SHELL_PLUS_PRINT_SQL = False
 IPYTHON_ARGUMENTS = ['--no-confirm-exit', '--no-banner']
 IPYTHON_ARGUMENTS = ['--no-confirm-exit', '--no-banner']
 IPYTHON_KERNEL_DISPLAY_NAME = 'ArchiveBox Django Shell'
 IPYTHON_KERNEL_DISPLAY_NAME = 'ArchiveBox Django Shell'
 if IS_SHELL:
 if IS_SHELL:
-    os.environ['PYTHONSTARTUP'] = str(PACKAGE_DIR / 'core' / 'shell_welcome_message.py')
+    os.environ['PYTHONSTARTUP'] = str(PACKAGE_DIR / 'misc' / 'shell_welcome_message.py')
 
 
 
 
 ################################################################################
 ################################################################################

+ 4 - 3
archivebox/core/urls.py

@@ -5,9 +5,10 @@ from django.views import static
 from django.conf import settings
 from django.conf import settings
 from django.views.generic.base import RedirectView
 from django.views.generic.base import RedirectView
 
 
-from .admin import archivebox_admin
-from .views import HomepageView, SnapshotView, PublicIndexView, AddView, HealthCheckView
-from .serve_static import serve_static
+from archivebox.misc.serve_static import serve_static
+
+from core.admin_site import archivebox_admin
+from core.views import HomepageView, SnapshotView, PublicIndexView, AddView, HealthCheckView
 
 
 # GLOBAL_CONTEXT doesn't work as-is, disabled for now: https://github.com/ArchiveBox/ArchiveBox/discussions/1306
 # GLOBAL_CONTEXT doesn't work as-is, disabled for now: https://github.com/ArchiveBox/ArchiveBox/discussions/1306
 # from archivebox.config import VERSION, VERSIONS_AVAILABLE, CAN_UPGRADE
 # from archivebox.config import VERSION, VERSIONS_AVAILABLE, CAN_UPGRADE

+ 1 - 1
archivebox/core/views.py

@@ -30,8 +30,8 @@ from queues.tasks import bg_add
 from archivebox.config import CONSTANTS_CONFIG, DATA_DIR, VERSION
 from archivebox.config import CONSTANTS_CONFIG, DATA_DIR, VERSION
 from archivebox.config.common import SHELL_CONFIG, SERVER_CONFIG
 from archivebox.config.common import SHELL_CONFIG, SERVER_CONFIG
 from archivebox.misc.util import base_url, htmlencode, ts_to_date_str
 from archivebox.misc.util import base_url, htmlencode, ts_to_date_str
+from archivebox.misc.serve_static import serve_static_with_byterange_support
 
 
-from .serve_static import serve_static_with_byterange_support
 from ..plugins_extractor.archivedotorg.apps import ARCHIVEDOTORG_CONFIG
 from ..plugins_extractor.archivedotorg.apps import ARCHIVEDOTORG_CONFIG
 from ..logging_util import printable_filesize
 from ..logging_util import printable_filesize
 from ..search import query_search_index
 from ..search import query_search_index

+ 0 - 0
archivebox/core/serve_static.py → archivebox/misc/serve_static.py


+ 0 - 0
archivebox/core/shell_welcome_message.py → archivebox/misc/shell_welcome_message.py