apis-acdhch-default-settings 2.7.0__py3-none-any.whl → 2.9.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 +21 -9
- 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.7.0.dist-info → apis_acdhch_default_settings-2.9.0.dist-info}/METADATA +4 -1
- apis_acdhch_default_settings-2.9.0.dist-info/RECORD +14 -0
- apis_acdhch_default_settings-2.7.0.dist-info/RECORD +0 -12
- {apis_acdhch_default_settings-2.7.0.dist-info → apis_acdhch_default_settings-2.9.0.dist-info}/WHEEL +0 -0
- {apis_acdhch_default_settings-2.7.0.dist-info → apis_acdhch_default_settings-2.9.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"
|
|
@@ -51,7 +51,7 @@ SPECTACULAR_SETTINGS: Dict[str, Any] = {
|
|
|
51
51
|
"TITLE": "APIS generic API",
|
|
52
52
|
"LICENSE": {"name": "MIT License", "url": "https://www.mit.edu/~amini/LICENSE.md"},
|
|
53
53
|
"VERSION": "0.13",
|
|
54
|
-
"DEFAULT_GENERATOR_CLASS":
|
|
54
|
+
"DEFAULT_GENERATOR_CLASS": "apis_core.generic.generators.CustomSchemaGenerator",
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
# django-csp settings
|
|
@@ -66,7 +66,13 @@ CSP_DEFAULT_SRC = (
|
|
|
66
66
|
"unpkg.com",
|
|
67
67
|
"*.openstreetmap.org",
|
|
68
68
|
)
|
|
69
|
-
CSP_IMG_SRC = [
|
|
69
|
+
CSP_IMG_SRC = [
|
|
70
|
+
"'self'",
|
|
71
|
+
"*.acdh.oeaw.ac.at",
|
|
72
|
+
"data:",
|
|
73
|
+
"*.openstreetmap.org",
|
|
74
|
+
"cdnjs.cloudflare.com",
|
|
75
|
+
]
|
|
70
76
|
|
|
71
77
|
# Content Security Policy settings
|
|
72
78
|
CSP_FRAME_ANCESTORS = ["https://*.pages.oeaw.ac.at/"]
|
|
@@ -102,6 +108,7 @@ MIDDLEWARE = [
|
|
|
102
108
|
"django.middleware.security.SecurityMiddleware",
|
|
103
109
|
"whitenoise.middleware.WhiteNoiseMiddleware",
|
|
104
110
|
"django.contrib.sessions.middleware.SessionMiddleware",
|
|
111
|
+
"django.middleware.locale.LocaleMiddleware",
|
|
105
112
|
"django.middleware.common.CommonMiddleware",
|
|
106
113
|
"django.middleware.csrf.CsrfViewMiddleware",
|
|
107
114
|
"django.contrib.auth.middleware.AuthenticationMiddleware",
|
|
@@ -125,6 +132,7 @@ TEMPLATES = [
|
|
|
125
132
|
"OPTIONS": {
|
|
126
133
|
"context_processors": [
|
|
127
134
|
"django.template.context_processors.debug",
|
|
135
|
+
"django.template.context_processors.i18n",
|
|
128
136
|
"django.template.context_processors.request",
|
|
129
137
|
"django.contrib.auth.context_processors.auth",
|
|
130
138
|
"django.contrib.messages.context_processors.messages",
|
|
@@ -135,7 +143,9 @@ TEMPLATES = [
|
|
|
135
143
|
|
|
136
144
|
# https://docs.djangoproject.com/en/stable/ref/settings/#auth-password-validators
|
|
137
145
|
AUTH_PASSWORD_VALIDATORS = [
|
|
138
|
-
{
|
|
146
|
+
{
|
|
147
|
+
"NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator"
|
|
148
|
+
},
|
|
139
149
|
{"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator"},
|
|
140
150
|
{"NAME": "django.contrib.auth.password_validation.CommonPasswordValidator"},
|
|
141
151
|
{"NAME": "django.contrib.auth.password_validation.NumericPasswordValidator"},
|
|
@@ -143,7 +153,7 @@ AUTH_PASSWORD_VALIDATORS = [
|
|
|
143
153
|
|
|
144
154
|
# Default primary key field type
|
|
145
155
|
# https://docs.djangoproject.com/en/stable/ref/settings/#default-auto-field
|
|
146
|
-
DEFAULT_AUTO_FIELD =
|
|
156
|
+
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"
|
|
147
157
|
|
|
148
158
|
# Internationalization
|
|
149
159
|
# https://docs.djangoproject.com/en/stable/topics/i18n/
|
|
@@ -179,7 +189,9 @@ ALLOWED_CIDR_NETS = ["10.0.0.0/8", "127.0.0.0/8"]
|
|
|
179
189
|
|
|
180
190
|
# https://docs.djangoproject.com/en/stable/ref/settings/#databases
|
|
181
191
|
# https://github.com/jazzband/dj-database-url
|
|
182
|
-
DATABASES = {
|
|
192
|
+
DATABASES = {
|
|
193
|
+
"default": dj_database_url.config(default="sqlite:///db.sqlite3", conn_max_age=600)
|
|
194
|
+
}
|
|
183
195
|
|
|
184
196
|
# https://docs.djangoproject.com/en/stable/ref/settings/#allowed-hosts
|
|
185
197
|
ALLOWED_HOSTS = ["localhost", "127.0.0.1"]
|
|
@@ -205,10 +217,10 @@ if os.environ.get("AUTH_LDAP_USER_LIST", False):
|
|
|
205
217
|
LOGGING = {
|
|
206
218
|
"version": 1,
|
|
207
219
|
"disable_existing_loggers": False,
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
220
|
+
"formatters": {
|
|
221
|
+
"verbose": {
|
|
222
|
+
"format": "%(asctime)s %(name)-6s %(levelname)-8s %(message)s",
|
|
223
|
+
},
|
|
212
224
|
},
|
|
213
225
|
"handlers": {
|
|
214
226
|
"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.9.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
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,6 +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
|
|
26
|
+
Requires-Dist: requests>=2
|
|
24
27
|
Requires-Dist: whitenoise<7.0,>=5.2
|
|
25
28
|
Description-Content-Type: text/markdown
|
|
26
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=CW3AM2JGFuR6bp4brp0c683hCWAz1aV7lVhyyvfO-sU,8841
|
|
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.9.0.dist-info/METADATA,sha256=kZb8Mxz9rbk8z7Va2zd3-zRX4JzUjP7B4m-KDi_2x7I,1393
|
|
12
|
+
apis_acdhch_default_settings-2.9.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
13
|
+
apis_acdhch_default_settings-2.9.0.dist-info/licenses/LICENSE,sha256=cMJgiPvvZVbZQcWrf-s1Es1W2b8sxKA0C7HlD4n8_Oo,1146
|
|
14
|
+
apis_acdhch_default_settings-2.9.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=TTrub-xbdpYndUE8WYnpR_WGpflcomEaReTXyr7AY98,8686
|
|
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.7.0.dist-info/METADATA,sha256=91_woIYeotdUXww5WfnqLNbcFAezcADyxmT5cgBGAWk,1304
|
|
10
|
-
apis_acdhch_default_settings-2.7.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
11
|
-
apis_acdhch_default_settings-2.7.0.dist-info/licenses/LICENSE,sha256=cMJgiPvvZVbZQcWrf-s1Es1W2b8sxKA0C7HlD4n8_Oo,1146
|
|
12
|
-
apis_acdhch_default_settings-2.7.0.dist-info/RECORD,,
|
{apis_acdhch_default_settings-2.7.0.dist-info → apis_acdhch_default_settings-2.9.0.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|