apis-acdhch-default-settings 2.6.0__py3-none-any.whl → 2.8.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.
- apis_acdhch_default_settings/locale/de/LC_MESSAGES/django.mo +0 -0
- apis_acdhch_default_settings/locale/de/LC_MESSAGES/django.po +22 -0
- apis_acdhch_default_settings/settings.py +20 -28
- apis_acdhch_default_settings/templates/base.html +5 -5
- apis_acdhch_default_settings/templates/imprint.html +4 -6
- apis_acdhch_default_settings/urls.py +1 -3
- apis_acdhch_default_settings/views.py +4 -2
- {apis_acdhch_default_settings-2.6.0.dist-info → apis_acdhch_default_settings-2.8.0.dist-info}/METADATA +5 -3
- apis_acdhch_default_settings-2.8.0.dist-info/RECORD +14 -0
- apis_acdhch_default_settings-2.6.0.dist-info/RECORD +0 -12
- {apis_acdhch_default_settings-2.6.0.dist-info → apis_acdhch_default_settings-2.8.0.dist-info}/WHEEL +0 -0
- {apis_acdhch_default_settings-2.6.0.dist-info → apis_acdhch_default_settings-2.8.0.dist-info}/licenses/LICENSE +0 -0
|
Binary file
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# SOME DESCRIPTIVE TITLE.
|
|
2
|
+
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
|
3
|
+
# This file is distributed under the same license as the PACKAGE package.
|
|
4
|
+
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
|
5
|
+
#
|
|
6
|
+
#, fuzzy
|
|
7
|
+
msgid ""
|
|
8
|
+
msgstr ""
|
|
9
|
+
"Project-Id-Version: PACKAGE VERSION\n"
|
|
10
|
+
"Report-Msgid-Bugs-To: \n"
|
|
11
|
+
"POT-Creation-Date: 2025-05-16 09:37+0000\n"
|
|
12
|
+
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
|
13
|
+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
|
14
|
+
"Language-Team: LANGUAGE <LL@li.org>\n"
|
|
15
|
+
"Language: \n"
|
|
16
|
+
"MIME-Version: 1.0\n"
|
|
17
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
|
18
|
+
"Content-Transfer-Encoding: 8bit\n"
|
|
19
|
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
|
20
|
+
#: apis_acdhch_default_settings/templates/base.html
|
|
21
|
+
msgid "Imprint"
|
|
22
|
+
msgstr "Impressum"
|
|
@@ -6,24 +6,6 @@ from pathlib import Path
|
|
|
6
6
|
from django.core.management.utils import get_random_secret_key
|
|
7
7
|
import dj_database_url
|
|
8
8
|
|
|
9
|
-
if os.environ.get("SENTRY_DSN"):
|
|
10
|
-
import sentry_sdk
|
|
11
|
-
from sentry_sdk.integrations.django import DjangoIntegration
|
|
12
|
-
|
|
13
|
-
sentry_sdk.init(
|
|
14
|
-
dsn=os.environ.get("SENTRY_DSN"),
|
|
15
|
-
integrations=[
|
|
16
|
-
DjangoIntegration(),
|
|
17
|
-
],
|
|
18
|
-
environment="production",
|
|
19
|
-
# we disable tracing by default
|
|
20
|
-
enable_tracing=False,
|
|
21
|
-
|
|
22
|
-
# If you wish to associate users to errors (assuming you are using
|
|
23
|
-
# django.contrib.auth) you may enable sending PII data.
|
|
24
|
-
send_default_pii=True,
|
|
25
|
-
)
|
|
26
|
-
|
|
27
9
|
SECRET_KEY = os.environ.get("SECRET_KEY", get_random_secret_key())
|
|
28
10
|
|
|
29
11
|
BASE_DIR = Path(__file__).resolve().parent.parent
|
|
@@ -67,10 +49,9 @@ SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
|
|
|
67
49
|
# https://drf-spectacular.readthedocs.io/en/latest/settings.html
|
|
68
50
|
SPECTACULAR_SETTINGS: Dict[str, Any] = {
|
|
69
51
|
"TITLE": "APIS generic API",
|
|
70
|
-
"DESCRIPTIOPN": "Provides access to the main APIS data-model endpoints.",
|
|
71
52
|
"LICENSE": {"name": "MIT License", "url": "https://www.mit.edu/~amini/LICENSE.md"},
|
|
72
53
|
"VERSION": "0.13",
|
|
73
|
-
"DEFAULT_GENERATOR_CLASS":
|
|
54
|
+
"DEFAULT_GENERATOR_CLASS": "apis_core.generic.generators.CustomSchemaGenerator",
|
|
74
55
|
}
|
|
75
56
|
|
|
76
57
|
# django-csp settings
|
|
@@ -85,7 +66,13 @@ CSP_DEFAULT_SRC = (
|
|
|
85
66
|
"unpkg.com",
|
|
86
67
|
"*.openstreetmap.org",
|
|
87
68
|
)
|
|
88
|
-
CSP_IMG_SRC = [
|
|
69
|
+
CSP_IMG_SRC = [
|
|
70
|
+
"'self'",
|
|
71
|
+
"*.acdh.oeaw.ac.at",
|
|
72
|
+
"data:",
|
|
73
|
+
"*.openstreetmap.org",
|
|
74
|
+
"cdnjs.cloudflare.com",
|
|
75
|
+
]
|
|
89
76
|
|
|
90
77
|
# Content Security Policy settings
|
|
91
78
|
CSP_FRAME_ANCESTORS = ["https://*.pages.oeaw.ac.at/"]
|
|
@@ -121,6 +108,7 @@ MIDDLEWARE = [
|
|
|
121
108
|
"django.middleware.security.SecurityMiddleware",
|
|
122
109
|
"whitenoise.middleware.WhiteNoiseMiddleware",
|
|
123
110
|
"django.contrib.sessions.middleware.SessionMiddleware",
|
|
111
|
+
"django.middleware.locale.LocaleMiddleware",
|
|
124
112
|
"django.middleware.common.CommonMiddleware",
|
|
125
113
|
"django.middleware.csrf.CsrfViewMiddleware",
|
|
126
114
|
"django.contrib.auth.middleware.AuthenticationMiddleware",
|
|
@@ -154,7 +142,9 @@ TEMPLATES = [
|
|
|
154
142
|
|
|
155
143
|
# https://docs.djangoproject.com/en/stable/ref/settings/#auth-password-validators
|
|
156
144
|
AUTH_PASSWORD_VALIDATORS = [
|
|
157
|
-
{
|
|
145
|
+
{
|
|
146
|
+
"NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator"
|
|
147
|
+
},
|
|
158
148
|
{"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator"},
|
|
159
149
|
{"NAME": "django.contrib.auth.password_validation.CommonPasswordValidator"},
|
|
160
150
|
{"NAME": "django.contrib.auth.password_validation.NumericPasswordValidator"},
|
|
@@ -162,7 +152,7 @@ AUTH_PASSWORD_VALIDATORS = [
|
|
|
162
152
|
|
|
163
153
|
# Default primary key field type
|
|
164
154
|
# https://docs.djangoproject.com/en/stable/ref/settings/#default-auto-field
|
|
165
|
-
DEFAULT_AUTO_FIELD =
|
|
155
|
+
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"
|
|
166
156
|
|
|
167
157
|
# Internationalization
|
|
168
158
|
# https://docs.djangoproject.com/en/stable/topics/i18n/
|
|
@@ -198,7 +188,9 @@ ALLOWED_CIDR_NETS = ["10.0.0.0/8", "127.0.0.0/8"]
|
|
|
198
188
|
|
|
199
189
|
# https://docs.djangoproject.com/en/stable/ref/settings/#databases
|
|
200
190
|
# https://github.com/jazzband/dj-database-url
|
|
201
|
-
DATABASES = {
|
|
191
|
+
DATABASES = {
|
|
192
|
+
"default": dj_database_url.config(default="sqlite:///db.sqlite3", conn_max_age=600)
|
|
193
|
+
}
|
|
202
194
|
|
|
203
195
|
# https://docs.djangoproject.com/en/stable/ref/settings/#allowed-hosts
|
|
204
196
|
ALLOWED_HOSTS = ["localhost", "127.0.0.1"]
|
|
@@ -224,10 +216,10 @@ if os.environ.get("AUTH_LDAP_USER_LIST", False):
|
|
|
224
216
|
LOGGING = {
|
|
225
217
|
"version": 1,
|
|
226
218
|
"disable_existing_loggers": False,
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
219
|
+
"formatters": {
|
|
220
|
+
"verbose": {
|
|
221
|
+
"format": "%(asctime)s %(name)-6s %(levelname)-8s %(message)s",
|
|
222
|
+
},
|
|
231
223
|
},
|
|
232
224
|
"handlers": {
|
|
233
225
|
"console": {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{% extends "base.html" %}
|
|
2
2
|
{% load i18n %}
|
|
3
|
-
|
|
4
3
|
{% block meta %}
|
|
5
|
-
{{ block.super }}
|
|
6
|
-
<meta name="monitoring" content="Icinga Check">
|
|
4
|
+
{{ block.super }}
|
|
5
|
+
<meta name="monitoring" content="Icinga Check">
|
|
7
6
|
{% endblock meta %}
|
|
8
|
-
|
|
9
7
|
{% block imprint %}
|
|
10
8
|
{% url "imprint" as imprint_url %}
|
|
11
|
-
{% if imprint_url %}
|
|
9
|
+
{% if imprint_url %}
|
|
10
|
+
<a href="{{ imprint_url }}">{% translate "Imprint" %}</a>
|
|
11
|
+
{% endif %}
|
|
12
12
|
{% endblock imprint %}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
{% extends basetemplate|default:"base.html" %}
|
|
2
|
-
|
|
3
2
|
{% block title %}Imprint{% endblock %}
|
|
4
|
-
|
|
5
3
|
{% block content %}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
<div class="container">
|
|
5
|
+
<div class="card imprint">
|
|
6
|
+
<div class="card-body">{{ imprint|safe }}</div>
|
|
7
|
+
</div>
|
|
9
8
|
</div>
|
|
10
|
-
</div>
|
|
11
9
|
{% endblock %}
|
|
@@ -12,9 +12,7 @@ from apis_core.apis_entities.api_views import GetEntityGeneric
|
|
|
12
12
|
urlpatterns = [
|
|
13
13
|
path("apis/", include("apis_core.urls", namespace="apis")),
|
|
14
14
|
path("api-auth/", include("rest_framework.urls", namespace="rest_framework")),
|
|
15
|
-
path(
|
|
16
|
-
"entity/<int:pk>/", GetEntityGeneric.as_view(), name="GetEntityGenericRoot"
|
|
17
|
-
),
|
|
15
|
+
path("entity/<int:pk>/", GetEntityGeneric.as_view(), name="GetEntityGenericRoot"),
|
|
18
16
|
path("admin/", admin.site.urls),
|
|
19
17
|
]
|
|
20
18
|
urlpatterns += staticfiles_urlpatterns()
|
|
@@ -7,13 +7,15 @@ from django.utils.decorators import method_decorator
|
|
|
7
7
|
from django.conf import settings
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
@method_decorator(cache_page(60 * 5), name=
|
|
10
|
+
@method_decorator(cache_page(60 * 5), name="dispatch")
|
|
11
11
|
class Imprint(TemplateView):
|
|
12
12
|
template_name = "imprint.html"
|
|
13
13
|
|
|
14
14
|
def get_context_data(self) -> str:
|
|
15
15
|
ctx = super().get_context_data()
|
|
16
|
-
base_url = getattr(
|
|
16
|
+
base_url = getattr(
|
|
17
|
+
settings, "ACDH_IMPRINT_URL", "https://imprint.acdh.oeaw.ac.at/"
|
|
18
|
+
)
|
|
17
19
|
redmine_id = getattr(settings, "REDMINE_ID", os.getenv("SERVICE_ID", ""))
|
|
18
20
|
|
|
19
21
|
r = requests.get(f"{base_url}{redmine_id}")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: apis-acdhch-default-settings
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.8.0
|
|
4
4
|
Summary: Default settings for APIS instances at the ACDH-CH
|
|
5
5
|
Project-URL: source, https://github.com/acdh-oeaw/apis-acdhch-default-settings
|
|
6
6
|
Project-URL: changelog, https://github.com/acdh-oeaw/apis-acdhch-default-settings/blob/main/CHANGELOG.md
|
|
@@ -9,11 +9,13 @@ Author-email: Birger Schacht <birger.schacht@oeaw.ac.at>
|
|
|
9
9
|
License-Expression: MIT
|
|
10
10
|
License-File: LICENSE
|
|
11
11
|
Requires-Python: >=3.11
|
|
12
|
+
Requires-Dist: apis-core-rdf>=0.40.0
|
|
12
13
|
Requires-Dist: dj-database-url<3.0,>=2.0.0
|
|
13
14
|
Requires-Dist: django-allow-cidr<0.8,>=0.6
|
|
14
|
-
Requires-Dist: django-auth-ldap<
|
|
15
|
+
Requires-Dist: django-auth-ldap<6.0,>=4.6.0
|
|
15
16
|
Requires-Dist: django-csp<4.0,>=3.7
|
|
16
17
|
Requires-Dist: django-removals<=2.0,>=1.0.5
|
|
18
|
+
Requires-Dist: django>=5
|
|
17
19
|
Requires-Dist: opentelemetry-distro
|
|
18
20
|
Requires-Dist: opentelemetry-exporter-otlp
|
|
19
21
|
Requires-Dist: opentelemetry-instrumentation-asgi
|
|
@@ -21,7 +23,7 @@ Requires-Dist: opentelemetry-instrumentation-django
|
|
|
21
23
|
Requires-Dist: opentelemetry-instrumentation-logging
|
|
22
24
|
Requires-Dist: opentelemetry-instrumentation-psycopg2
|
|
23
25
|
Requires-Dist: opentelemetry-instrumentation-wsgi
|
|
24
|
-
Requires-Dist:
|
|
26
|
+
Requires-Dist: requests>=2
|
|
25
27
|
Requires-Dist: whitenoise<7.0,>=5.2
|
|
26
28
|
Description-Content-Type: text/markdown
|
|
27
29
|
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
apis_acdhch_default_settings/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
apis_acdhch_default_settings/ldapauth.py,sha256=P1NDgWG2Pp4JzqoETq3VDC3DtECoEIXWBA3Lzn6CUIA,423
|
|
3
|
+
apis_acdhch_default_settings/querysets.py,sha256=3sqDRupDrDIxE2Oyf-7dC6BfU6p8pROzjN5KZPS3AQE,1203
|
|
4
|
+
apis_acdhch_default_settings/settings.py,sha256=U7mqHJCd-nDUXYn1CdOp6Wic75HYBB6ZNivAOmGrIgU,8782
|
|
5
|
+
apis_acdhch_default_settings/urls.py,sha256=VG5xY3GabwRc4DIPwTyvooN4UpUSsuzsI4-m8UHhVRE,1003
|
|
6
|
+
apis_acdhch_default_settings/views.py,sha256=Xffr0DkaIr81BTj0xlqUMd38C8XGYubL9RJkBxrcAyE,1044
|
|
7
|
+
apis_acdhch_default_settings/locale/de/LC_MESSAGES/django.mo,sha256=ca6G5CeEdkrD7cVblXxxJNNiSJcP2Hq1AbMnG7usF18,422
|
|
8
|
+
apis_acdhch_default_settings/locale/de/LC_MESSAGES/django.po,sha256=MkpoGg0Mts7ThF4xJrxzVkOJxBhVGJFi3Wl7yQhZ8rw,714
|
|
9
|
+
apis_acdhch_default_settings/templates/base.html,sha256=CA1AIklsCajWcng36Ip9J1ZSQfzXjrv9DIm1nk-k3EU,342
|
|
10
|
+
apis_acdhch_default_settings/templates/imprint.html,sha256=8P6TUA0bkhXTQAhCiFZONe_xJhPt8YvNTzNmAWNWZ0k,270
|
|
11
|
+
apis_acdhch_default_settings-2.8.0.dist-info/METADATA,sha256=X37llQ7oKtN26OueecEGwiy1v3QHHbQsQBeo2MIGcRw,1393
|
|
12
|
+
apis_acdhch_default_settings-2.8.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
13
|
+
apis_acdhch_default_settings-2.8.0.dist-info/licenses/LICENSE,sha256=cMJgiPvvZVbZQcWrf-s1Es1W2b8sxKA0C7HlD4n8_Oo,1146
|
|
14
|
+
apis_acdhch_default_settings-2.8.0.dist-info/RECORD,,
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
apis_acdhch_default_settings/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
apis_acdhch_default_settings/ldapauth.py,sha256=P1NDgWG2Pp4JzqoETq3VDC3DtECoEIXWBA3Lzn6CUIA,423
|
|
3
|
-
apis_acdhch_default_settings/querysets.py,sha256=3sqDRupDrDIxE2Oyf-7dC6BfU6p8pROzjN5KZPS3AQE,1203
|
|
4
|
-
apis_acdhch_default_settings/settings.py,sha256=kxo4nU4tdj7XzFFnYM5wi2TP0YSZwZfMpDyapcbeYIQ,9297
|
|
5
|
-
apis_acdhch_default_settings/urls.py,sha256=QOkc8QD0rEj0ftcJWJqVyO9qFAgVXrj1rl9R9jARSqc,1017
|
|
6
|
-
apis_acdhch_default_settings/views.py,sha256=4fwNnkjH-X4T2zojGTFndxvznOl_3JavHbmpDLD6wOA,1022
|
|
7
|
-
apis_acdhch_default_settings/templates/base.html,sha256=9W2T6xxGbNHdfhyjaKyiUBPi8n1hAyOC9ktCWqJNX4k,322
|
|
8
|
-
apis_acdhch_default_settings/templates/imprint.html,sha256=juOqq6yzT9FMhjPjhbofDPZxRNO2fhOLlS478reFjE0,254
|
|
9
|
-
apis_acdhch_default_settings-2.6.0.dist-info/METADATA,sha256=7lSqTSQPr01epoM1Pd-0-bdmO6JnWypz3sPXQJOTLYs,1343
|
|
10
|
-
apis_acdhch_default_settings-2.6.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
11
|
-
apis_acdhch_default_settings-2.6.0.dist-info/licenses/LICENSE,sha256=cMJgiPvvZVbZQcWrf-s1Es1W2b8sxKA0C7HlD4n8_Oo,1146
|
|
12
|
-
apis_acdhch_default_settings-2.6.0.dist-info/RECORD,,
|
{apis_acdhch_default_settings-2.6.0.dist-info → apis_acdhch_default_settings-2.8.0.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|