apis-acdhch-default-settings 1.5.0__py3-none-any.whl → 1.6.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -60,9 +60,9 @@ INSTALLED_APPS = [
60
60
  "drf_spectacular",
61
61
  ]
62
62
 
63
- # https://docs.djangoproject.com/en/5.0/ref/settings/#std-setting-USE_X_FORWARDED_HOST
63
+ # https://docs.djangoproject.com/en/stable/ref/settings/#std-setting-USE_X_FORWARDED_HOST
64
64
  USE_X_FORWARDED_HOST = True
65
- # https://docs.djangoproject.com/en/5.0/ref/settings/#secure-proxy-ssl-header
65
+ # https://docs.djangoproject.com/en/stable/ref/settings/#secure-proxy-ssl-header
66
66
  SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
67
67
 
68
68
  # drf-spectacular settings
@@ -121,7 +121,7 @@ REST_FRAMEWORK = {
121
121
  "DEFAULT_SCHEMA_CLASS": "drf_spectacular.openapi.AutoSchema",
122
122
  }
123
123
 
124
- # https://docs.djangoproject.com/en/5.0/ref/settings/#std-setting-MIDDLEWARE
124
+ # https://docs.djangoproject.com/en/stable/ref/settings/#std-setting-MIDDLEWARE
125
125
  MIDDLEWARE = [
126
126
  "allow_cidr.middleware.AllowCIDRMiddleware",
127
127
  "django.middleware.security.SecurityMiddleware",
@@ -136,10 +136,10 @@ MIDDLEWARE = [
136
136
  "crum.CurrentRequestUserMiddleware",
137
137
  ]
138
138
 
139
- # https://docs.djangoproject.com/en/5.0/ref/settings/#root-urlconf
139
+ # https://docs.djangoproject.com/en/stable/ref/settings/#root-urlconf
140
140
  ROOT_URLCONF = "apis_acdhch_default_settings.urls"
141
141
 
142
- # https://docs.djangoproject.com/en/5.0/ref/settings/#templates
142
+ # https://docs.djangoproject.com/en/stable/ref/settings/#templates
143
143
  TEMPLATES = [
144
144
  {
145
145
  "BACKEND": "django.template.backends.django.DjangoTemplates",
@@ -156,7 +156,7 @@ TEMPLATES = [
156
156
  }
157
157
  ]
158
158
 
159
- # https://docs.djangoproject.com/en/5.0/ref/settings/#auth-password-validators
159
+ # https://docs.djangoproject.com/en/stable/ref/settings/#auth-password-validators
160
160
  AUTH_PASSWORD_VALIDATORS = [
161
161
  {"NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator"},
162
162
  {"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator"},
@@ -166,7 +166,7 @@ AUTH_PASSWORD_VALIDATORS = [
166
166
 
167
167
 
168
168
  # Internationalization
169
- # https://docs.djangoproject.com/en/1.11/topics/i18n/
169
+ # https://docs.djangoproject.com/en/stable/topics/i18n/
170
170
  LANGUAGE_CODE = "en"
171
171
  TIME_ZONE = "UTC"
172
172
  USE_I18N = True
@@ -174,7 +174,7 @@ USE_L10N = True
174
174
  USE_TZ = True
175
175
 
176
176
  # Static files (CSS, JavaScript, Images)
177
- # https://docs.djangoproject.com/en/1.11/howto/static-files/
177
+ # https://docs.djangoproject.com/en/stable/howto/static-files/
178
178
  STATIC_ROOT = os.path.join(BASE_DIR, "staticfiles/")
179
179
  STATIC_URL = "/static/"
180
180
  MEDIA_ROOT = os.path.join(BASE_DIR, "media/")
@@ -197,11 +197,11 @@ SHARED_URL = "https://shared.acdh.oeaw.ac.at/"
197
197
  # https://github.com/mozmeao/django-allow-cidr
198
198
  ALLOWED_CIDR_NETS = ["10.0.0.0/8", "127.0.0.0/8"]
199
199
 
200
- # https://docs.djangoproject.com/en/5.0/ref/settings/#databases
200
+ # https://docs.djangoproject.com/en/stable/ref/settings/#databases
201
201
  # https://github.com/jazzband/dj-database-url
202
202
  DATABASES = {'default': dj_database_url.config(default='sqlite:///db.sqlite3', conn_max_age=600)}
203
203
 
204
- # https://docs.djangoproject.com/en/5.0/ref/settings/#allowed-hosts
204
+ # https://docs.djangoproject.com/en/stable/ref/settings/#allowed-hosts
205
205
  ALLOWED_HOSTS = ["localhost", "127.0.0.1"]
206
206
  if os.environ.get("PUBLIC_URL"):
207
207
  ALLOWED_HOSTS.append(re.sub(r"https?://", "", os.environ.get("PUBLIC_URL")))
@@ -214,13 +214,13 @@ if os.environ.get("AUTH_LDAP_USER_LIST", False):
214
214
  AUTH_LDAP_SERVER_URI = os.environ.get("ARZ_AUTH_LDAP_SERVER_URI")
215
215
  AUTH_LDAP_USER_DN_TEMPLATE = "%(user)s@oeaw.ads"
216
216
 
217
- # https://docs.djangoproject.com/en/5.0/ref/settings/#std-setting-AUTHENTICATION_BACKENDS
217
+ # https://docs.djangoproject.com/en/stable/ref/settings/#std-setting-AUTHENTICATION_BACKENDS
218
218
  AUTHENTICATION_BACKENDS = [
219
219
  "apis_acdhch_default_settings.ldapauth.CustomLDAPBackend",
220
220
  "django.contrib.auth.backends.ModelBackend",
221
221
  ]
222
222
 
223
- # https://docs.djangoproject.com/en/5.0/howto/logging/
223
+ # https://docs.djangoproject.com/en/stable/howto/logging/
224
224
  # setup logging to log everything to stdout
225
225
  LOGGING = {
226
226
  "version": 1,
@@ -242,7 +242,7 @@ LOGGING = {
242
242
  },
243
243
  }
244
244
 
245
- # https://docs.djangoproject.com/en/5.0/ref/settings/#std-setting-DEBUG
245
+ # https://docs.djangoproject.com/en/stable/ref/settings/#std-setting-DEBUG
246
246
  if debug := os.environ.get("DJANGO_DEBUG", False):
247
247
  DEBUG = debug.lower() == "true"
248
248
 
@@ -251,3 +251,9 @@ if debug := os.environ.get("DJANGO_DEBUG", False):
251
251
  # information to set the repository url in APIS
252
252
  if os.environ.get("GITLAB_ENVIRONMENT_URL"):
253
253
  GIT_REPOSITORY_URL = os.environ.get("GITLAB_ENVIRONMENT_URL")
254
+
255
+
256
+ # https://docs.djangoproject.com/en/stable/ref/settings/#login-url
257
+ # apis-core provides a login interface on /apis/accounts/login
258
+ # so we use that route as default login route
259
+ LOGIN_URL = "/apis/accounts/login"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: apis-acdhch-default-settings
3
- Version: 1.5.0
3
+ Version: 1.6.0
4
4
  Summary: Default settings for APIS instances at the ACDH-CH
5
5
  License: MIT
6
6
  Author: Birger Schacht
@@ -1,10 +1,10 @@
1
1
  apis_acdhch_default_settings/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  apis_acdhch_default_settings/ldapauth.py,sha256=P1NDgWG2Pp4JzqoETq3VDC3DtECoEIXWBA3Lzn6CUIA,423
3
- apis_acdhch_default_settings/settings.py,sha256=YEOktcgcCzsGKBOS3UDD5GcYhhatwxBTaLwTMgYYtVQ,8686
3
+ apis_acdhch_default_settings/settings.py,sha256=uyQfbXylxKNRF4Be1eOxZYG2ozGaBMBF6sMVkLuIoG8,8936
4
4
  apis_acdhch_default_settings/templates/base.html,sha256=c3QhbTzJLzCii-Ck5x0wftHx_Y0aFhPfJUhUVknz_Ks,217
5
5
  apis_acdhch_default_settings/templates/imprint.html,sha256=juOqq6yzT9FMhjPjhbofDPZxRNO2fhOLlS478reFjE0,254
6
6
  apis_acdhch_default_settings/urls.py,sha256=jh0F7V3NlqtRna_10ouM2oBhmOfUimuOgQYNZwpk2cc,981
7
7
  apis_acdhch_default_settings/utils.py,sha256=9uh0oQMPirTYvGxMg1f8IrOqrsxdxa8UgDJOrZaJdPs,647
8
- apis_acdhch_default_settings-1.5.0.dist-info/METADATA,sha256=l2-D8GUWCDZHkbDNx8gos6sjBsJro_Nz1zMiXlasAyc,1292
9
- apis_acdhch_default_settings-1.5.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
10
- apis_acdhch_default_settings-1.5.0.dist-info/RECORD,,
8
+ apis_acdhch_default_settings-1.6.0.dist-info/METADATA,sha256=lD6Z0SpHiusCo5bgxYT1ndpbv8_dTw1FiPukY5fuIrA,1292
9
+ apis_acdhch_default_settings-1.6.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
10
+ apis_acdhch_default_settings-1.6.0.dist-info/RECORD,,