Parcourir la source

improve some comments

Nick Sweeting il y a 2 ans
Parent
commit
ffe2968e4f
2 fichiers modifiés avec 12 ajouts et 2 suppressions
  1. 9 2
      archivebox/core/settings.py
  2. 3 0
      archivebox/core/urls.py

+ 9 - 2
archivebox/core/settings.py

@@ -68,6 +68,13 @@ INSTALLED_APPS = [
     'django_extensions',
 ]
 
+
+# For usage with https://www.jetadmin.io/integrations/django
+# INSTALLED_APPS += ['jet_django']
+# JET_PROJECT = 'archivebox'
+# JET_TOKEN = 'some-api-token-here'
+
+
 MIDDLEWARE = [
     'core.middleware.TimezoneMiddleware',
     'django.middleware.security.SecurityMiddleware',
@@ -317,8 +324,8 @@ class NoisyRequestsFilter(logging.Filter):
 if LOGS_DIR.exists():
     ERROR_LOG = (LOGS_DIR / 'errors.log')
 else:
-    # meh too many edge cases here around creating log dir w/ correct permissions
-    # cant be bothered, just trash the log and let them figure it out via stdout/stderr
+    # historically too many edge cases here around creating log dir w/ correct permissions early on
+    # if there's an issue on startup, we trash the log and let user figure it out via stdout/stderr
     ERROR_LOG = tempfile.NamedTemporaryFile().name
 
 LOGGING = {

+ 3 - 0
archivebox/core/urls.py

@@ -33,6 +33,9 @@ urlpatterns = [
     path('admin/', admin.site.urls),
 
     path('health/', HealthCheckView.as_view(), name='healthcheck'),
+    path('error/', lambda _: 1/0),
+
+    # path('jet_api/', include('jet_django.urls')),  Enable to use https://www.jetadmin.io/integrations/django
 
     path('index.html', RedirectView.as_view(url='/')),
     path('index.json', static.serve, {'document_root': settings.OUTPUT_DIR, 'path': 'index.json'}),