|
@@ -8,11 +8,12 @@ from django.views.generic.base import RedirectView
|
|
|
|
|
|
|
|
from core.views import HomepageView, SnapshotView, PublicIndexView, AddView, HealthCheckView
|
|
from core.views import HomepageView, SnapshotView, PublicIndexView, AddView, HealthCheckView
|
|
|
|
|
|
|
|
-from config import VERSION, VERSIONS_AVAILABLE, CAN_UPGRADE
|
|
|
|
|
|
|
+# GLOBAL_CONTEXT doesn't work as-is, disabled for now: https://github.com/ArchiveBox/ArchiveBox/discussions/1306
|
|
|
|
|
+# from config import VERSION, VERSIONS_AVAILABLE, CAN_UPGRADE
|
|
|
|
|
+# GLOBAL_CONTEXT = {'VERSION': VERSION, 'VERSIONS_AVAILABLE': VERSIONS_AVAILABLE, 'CAN_UPGRADE': CAN_UPGRADE}
|
|
|
|
|
|
|
|
-# print('DEBUG', settings.DEBUG)
|
|
|
|
|
|
|
|
|
|
-GLOBAL_CONTEXT = {'VERSION': VERSION, 'VERSIONS_AVAILABLE': VERSIONS_AVAILABLE, 'CAN_UPGRADE': CAN_UPGRADE}
|
|
|
|
|
|
|
+# print('DEBUG', settings.DEBUG)
|
|
|
|
|
|
|
|
urlpatterns = [
|
|
urlpatterns = [
|
|
|
path('public/', PublicIndexView.as_view(), name='public-index'),
|
|
path('public/', PublicIndexView.as_view(), name='public-index'),
|
|
@@ -33,7 +34,10 @@ urlpatterns = [
|
|
|
|
|
|
|
|
|
|
|
|
|
path('accounts/', include('django.contrib.auth.urls')),
|
|
path('accounts/', include('django.contrib.auth.urls')),
|
|
|
- path('admin/', admin.site.urls, {'extra_context': GLOBAL_CONTEXT}),
|
|
|
|
|
|
|
+ path('admin/', admin.site.urls),
|
|
|
|
|
+
|
|
|
|
|
+ # do not add extra_context like this as not all admin views (e.g. ModelAdmin.autocomplete_view accept extra kwargs)
|
|
|
|
|
+ # path('admin/', admin.site.urls, {'extra_context': GLOBAL_CONTEXT}),
|
|
|
|
|
|
|
|
path('health/', HealthCheckView.as_view(), name='healthcheck'),
|
|
path('health/', HealthCheckView.as_view(), name='healthcheck'),
|
|
|
path('error/', lambda _: 1/0),
|
|
path('error/', lambda _: 1/0),
|