|
8 | 8 |
|
9 | 9 | from core.views import HomepageView, SnapshotView, PublicIndexView, AddView, HealthCheckView
|
10 | 10 |
|
11 |
| -from config import VERSION, VERSIONS_AVAILABLE, CAN_UPGRADE |
| 11 | +# GLOBAL_CONTEXT doesn't work as-is, disabled for now: https://github.com/ArchiveBox/ArchiveBox/discussions/1306 |
| 12 | +# from config import VERSION, VERSIONS_AVAILABLE, CAN_UPGRADE |
| 13 | +# GLOBAL_CONTEXT = {'VERSION': VERSION, 'VERSIONS_AVAILABLE': VERSIONS_AVAILABLE, 'CAN_UPGRADE': CAN_UPGRADE} |
12 | 14 |
|
13 |
| -# print('DEBUG', settings.DEBUG) |
14 | 15 |
|
15 |
| -GLOBAL_CONTEXT = {'VERSION': VERSION, 'VERSIONS_AVAILABLE': VERSIONS_AVAILABLE, 'CAN_UPGRADE': CAN_UPGRADE} |
| 16 | +# print('DEBUG', settings.DEBUG) |
16 | 17 |
|
17 | 18 | urlpatterns = [
|
18 | 19 | path('public/', PublicIndexView.as_view(), name='public-index'),
|
|
33 | 34 |
|
34 | 35 |
|
35 | 36 | path('accounts/', include('django.contrib.auth.urls')),
|
36 |
| - path('admin/', admin.site.urls, {'extra_context': GLOBAL_CONTEXT}), |
| 37 | + path('admin/', admin.site.urls), |
| 38 | + |
| 39 | + # do not add extra_context like this as not all admin views (e.g. ModelAdmin.autocomplete_view accept extra kwargs) |
| 40 | + # path('admin/', admin.site.urls, {'extra_context': GLOBAL_CONTEXT}), |
37 | 41 |
|
38 | 42 | path('health/', HealthCheckView.as_view(), name='healthcheck'),
|
39 | 43 | path('error/', lambda _: 1/0),
|
|
0 commit comments