commonground-api-common 2.5.2__py3-none-any.whl → 2.5.4__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.
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: commonground-api-common
3
- Version: 2.5.2
3
+ Version: 2.5.4
4
4
  Summary: Commonground API tooling
5
5
  Home-page: https://github.com/maykinmedia/commonground-api-common
6
6
  Author: Maykin Media, VNG-Realisatie
@@ -1,5 +1,5 @@
1
- commonground_api_common-2.5.2.data/scripts/generate_schema,sha256=OpKgzlFc_uzA3TVW_vHSYXAD_feLaCdTEnkWjIcxVzA,280
2
- vng_api_common/__init__.py,sha256=V-NiKyTdzd5WY2b4iSwaM1JcbOEyZ0IH2WQKBnjN2DI,22
1
+ commonground_api_common-2.5.4.data/scripts/generate_schema,sha256=OpKgzlFc_uzA3TVW_vHSYXAD_feLaCdTEnkWjIcxVzA,280
2
+ vng_api_common/__init__.py,sha256=u7qJtvbcGbgT3ue2tQMbSOeGJqqkDTDm-_7HUe49PZA,22
3
3
  vng_api_common/admin.py,sha256=iFtUPGf-ha0I-bXgq8QIFrP23Kzk_H3FlgAjt0U-ip0,259
4
4
  vng_api_common/apps.py,sha256=QQiJXRmjX9Q91oh0P9fvVnHe3NSYd1cEcUUBw0HLBCA,3690
5
5
  vng_api_common/checks.py,sha256=tOyfV7MMLGh4anrd_W30LvJCxiyQ4sFs1mGd9mtrEc0,1175
@@ -21,7 +21,7 @@ vng_api_common/middleware.py,sha256=2DRw0hPpvUMqwoH1Ze8S7tDB16lmj4Bnd6vN5ijkGM8,
21
21
  vng_api_common/mocks.py,sha256=0sELLs-uy2ndu29m5P6FN_p1ehNhYv7IoRayYPs379Y,6200
22
22
  vng_api_common/models.py,sha256=3WgpCWQpkCOrMCtqp7EbnP681II43Sg_cch8ZOm4EcU,1707
23
23
  vng_api_common/oas.py,sha256=ATqqNM7zkDMoK3E-cxNh_c65n6YCrP96KxCFYfkEVK0,2523
24
- vng_api_common/pagination.py,sha256=sI6VJ5AHDBhtNRQ8OFrD2heQK-NxaL_6n73ijiqWDLc,255
24
+ vng_api_common/pagination.py,sha256=H-GPyDhM3KnxXk44__JLipvTghXQNqr3Rp6XFrkP32w,528
25
25
  vng_api_common/permissions.py,sha256=ayDxk9Wt8j0yO57FhZ8XaRkPET4lAqd8SSw3m4o3EGs,7562
26
26
  vng_api_common/polymorphism.py,sha256=N-x39pG2unD4N0ZbxFvuhE8ibPaJ0eKeqfvAJW3NnEU,6623
27
27
  vng_api_common/routers.py,sha256=hEnhBulkgMM-7W_lYaykKTgTBj3-avl7DGsR9P7BbTU,1897
@@ -30,7 +30,7 @@ vng_api_common/scopes.py,sha256=PGs6CkXorAAdWXGFY1bSy-jmsPn122Njen9aFFOpFIQ,2351
30
30
  vng_api_common/search.py,sha256=yehS6boCOk1JXLCqAMU-B62hWtbTBSf_WKIVGPgp0Mg,1045
31
31
  vng_api_common/serializers.py,sha256=NdrZJqP7p54lRKoKG4mEDS9MqaMcPESIr4dB1tnLaqI,10163
32
32
  vng_api_common/urls.py,sha256=9IWHYLlEIIHNaZ_Zq02qNQ2HJpETb7o-89r7yBM_tQs,270
33
- vng_api_common/utils.py,sha256=zrtpssOA-NcJHhAlxioBiXeY3G2R_uf0l8oWkDD_EiE,8511
33
+ vng_api_common/utils.py,sha256=EHqVjZhtqnbU7YrqgYIBss28Sd19jtnTLNaMWLfj3Zw,8203
34
34
  vng_api_common/validators.py,sha256=ejaFZvFXFaBlqxjA2_07NSHKHlG5pejrfC_GHjwCj6E,12852
35
35
  vng_api_common/version.py,sha256=yJV9_yTM7Qnzg0zGNkJQkN9Uai3I_ZUkcyseJRPRk5I,129
36
36
  vng_api_common/views.py,sha256=pxpI2dl22I9auTYvRJ-Rx-_NHAKgo1F2QwQJF6WIjrE,7603
@@ -106,7 +106,7 @@ vng_api_common/caching/models.py,sha256=RroS9HFiKNXDV59Odh0x8BO8Az8E81v4gwuprF1A
106
106
  vng_api_common/caching/registry.py,sha256=mY1r99x7m0DQ1BN9lZF2zMjFj_oDNq7urxDkOH7-8Yg,6205
107
107
  vng_api_common/caching/signals.py,sha256=78ej5cVan-JpNHKzZNAfs0m2ON_TXKphe8ZKtP-6FVY,4615
108
108
  vng_api_common/conf/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
109
- vng_api_common/conf/api.py,sha256=Lx3Kk7S7mKxeaUr0dm6jbKrEh4WI2gye4i7QxN2x69E,3150
109
+ vng_api_common/conf/api.py,sha256=OLl39A8pkMlXie9i6FMSLbW9oX8iFqegPt9-yDZdBaI,3198
110
110
  vng_api_common/contrib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
111
111
  vng_api_common/contrib/setup_configuration/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
112
112
  vng_api_common/contrib/setup_configuration/models.py,sha256=1-G0hXeRe-x6GYtsAaQeMGXq0-cwU5LMb8KTQWj-pQk,1201
@@ -120,8 +120,8 @@ vng_api_common/extensions/geojson.py,sha256=mVqry8F7RQm0YIK3m5scazePB7KprffQy02R
120
120
  vng_api_common/extensions/hyperlink.py,sha256=wPjivZP4tU1mZc2wH7sX36SEAGejeog-CONUySPaAEQ,1382
121
121
  vng_api_common/extensions/polymorphic.py,sha256=Hjzn1VAx3E0Eafb7NctkNQuDYJeh6ln0KHgVNRjHG1s,2768
122
122
  vng_api_common/extensions/query.py,sha256=mXxv2aiyP-kHmXUrszHqxEKhAedUugwVJZljQ5nPLcY,585
123
- vng_api_common/locale/nl/LC_MESSAGES/django.mo,sha256=qcZT0NRN7oUzyoPGdV4kVFgovQ6gRhSvVthgFuItqEs,5094
124
- vng_api_common/locale/nl/LC_MESSAGES/django.po,sha256=_pSS99mfvZUnBobzffC8Yz3lCt4w8eKUxEx7YBcsFdY,20519
123
+ vng_api_common/locale/nl/LC_MESSAGES/django.mo,sha256=9Kp07FbCJQdF77i26PpjV8-vuKOmddeubPsoExnhVYw,5509
124
+ vng_api_common/locale/nl/LC_MESSAGES/django.po,sha256=81RUc2JgnHsTlZ9W09QuLXMSqpj5PXRx1MfpKWHbVsk,20777
125
125
  vng_api_common/migrations/0001_initial.py,sha256=frE83rux6uVHK4v-1fsb_1C00TBQQ6koFBA3DoVPHmk,895
126
126
  vng_api_common/migrations/0002_apicredential.py,sha256=AYgkLMizI0g-Ogth8j_FVJHTDDI3bWzQgZzuQeABzaU,1083
127
127
  vng_api_common/migrations/0003_auto_20190417_1145.py,sha256=0ABqDggAdjmZxhSsLrMb2ZBwTcR1BOWo1Tn8StfiG0A,1001
@@ -183,7 +183,7 @@ vng_api_common/tests/auth.py,sha256=IKDWTEFv4Bign4F70-ibsFcnJqRxEJaXvqaPQJWa1xY,
183
183
  vng_api_common/tests/caching.py,sha256=zfIw5cRRvO9cekHZZKfRqZc8cx5IfJUYNmcH6cuIMg4,624
184
184
  vng_api_common/tests/schema.py,sha256=WDvifDQQiKqIpQijpeQ7rYkFroJmuPuHe7zNhl1Bigk,2293
185
185
  vng_api_common/tests/urls.py,sha256=PFrYzQbBC0TFPMEn3uPhcBG0IQs9JsEPqckicJT1UA4,2159
186
- commonground_api_common-2.5.2.dist-info/METADATA,sha256=vD9d-hnOgZrYDCzWBdhRledOcwBZ8NTPHD2CHxNMKSc,6988
187
- commonground_api_common-2.5.2.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
188
- commonground_api_common-2.5.2.dist-info/top_level.txt,sha256=vPismc83zPzWXTmlNCCwfDlFV9iygJYxNJW5iDjKTgw,15
189
- commonground_api_common-2.5.2.dist-info/RECORD,,
186
+ commonground_api_common-2.5.4.dist-info/METADATA,sha256=yNLD9sTSt2HOKZ7ERdkKaJSJ4Elf0qcC9bIiObaVceM,6988
187
+ commonground_api_common-2.5.4.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
188
+ commonground_api_common-2.5.4.dist-info/top_level.txt,sha256=vPismc83zPzWXTmlNCCwfDlFV9iygJYxNJW5iDjKTgw,15
189
+ commonground_api_common-2.5.4.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.8.2)
2
+ Generator: setuptools (77.0.3)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1 +1 @@
1
- __version__ = "2.5.2"
1
+ __version__ = "2.5.4"
@@ -3,18 +3,19 @@ __all__ = [
3
3
  "BASE_REST_FRAMEWORK",
4
4
  "BASE_SPECTACULAR_SETTINGS",
5
5
  "COMMON_SPEC",
6
- "LINK_FETCHER",
7
- "GEMMA_URL_TEMPLATE",
6
+ "COMMONGROUND_API_COMMON_GET_DOMAIN",
8
7
  "GEMMA_URL_COMPONENTTYPE",
9
- "GEMMA_URL_INFORMATIEMODEL",
10
8
  "GEMMA_URL_INFORMATIEMODEL_VERSIE",
11
- "REDOC_SETTINGS",
12
- "NOTIFICATIONS_KANAAL",
13
- "NOTIFICATIONS_DISABLED",
9
+ "GEMMA_URL_INFORMATIEMODEL",
10
+ "GEMMA_URL_TEMPLATE",
14
11
  "JWT_LEEWAY",
15
- "SECURITY_DEFINITION_NAME",
16
- "COMMONGROUND_API_COMMON_GET_DOMAIN",
17
12
  "JWT_SPECTACULAR_SETTINGS",
13
+ "LINK_FETCHER",
14
+ "NOTIFICATIONS_DISABLED",
15
+ "NOTIFICATIONS_KANAAL",
16
+ "REDOC_SETTINGS",
17
+ "SECURITY_DEFINITION_NAME",
18
+ "SITE_DOMAIN",
18
19
  ]
19
20
 
20
21
  API_VERSION = "1.0.0-rc1" # semantic version
@@ -98,3 +99,5 @@ COMMON_SPEC = f"https://raw.githubusercontent.com/{vng_repo}/feature/{vng_branch
98
99
  JWT_LEEWAY = 0 # default in PyJWT
99
100
 
100
101
  COMMONGROUND_API_COMMON_GET_DOMAIN = "vng_api_common.utils.get_site_domain"
102
+
103
+ SITE_DOMAIN = "example.com"
@@ -8,7 +8,7 @@ msgid ""
8
8
  msgstr ""
9
9
  "Project-Id-Version: PACKAGE VERSION\n"
10
10
  "Report-Msgid-Bugs-To: \n"
11
- "POT-Creation-Date: 2025-03-06 08:59-0600\n"
11
+ "POT-Creation-Date: 2025-03-18 03:58-0500\n"
12
12
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -714,6 +714,14 @@ msgstr "Autorisatiegegevens"
714
714
  msgid "Notificaties"
715
715
  msgstr ""
716
716
 
717
+ #: pagination.py:7
718
+ msgid "A page number within the paginated result set."
719
+ msgstr "Een pagina binnen de gepagineerde set resultaten."
720
+
721
+ #: pagination.py:8
722
+ msgid "Number of results to return per page."
723
+ msgstr "Het aantal resultaten terug te geven per pagina."
724
+
717
725
  #: permissions.py:146
718
726
  msgid "The object does not exist in the database"
719
727
  msgstr ""
@@ -1,5 +1,13 @@
1
+ from django.utils.translation import gettext_lazy as _
2
+
1
3
  from rest_framework.pagination import PageNumberPagination
2
4
 
5
+ # These strings are defined by rest_framework.pagination, but never translated
6
+ FORCE_TRANSLATION_STRINGS = [
7
+ _("A page number within the paginated result set."),
8
+ _("Number of results to return per page."),
9
+ ]
10
+
3
11
 
4
12
  class DynamicPageSizeMixin:
5
13
  page_size = 100
vng_api_common/utils.py CHANGED
@@ -5,7 +5,6 @@ from typing import TYPE_CHECKING, List, Optional, Union
5
5
 
6
6
  from django.apps import apps
7
7
  from django.conf import settings
8
- from django.core.exceptions import ImproperlyConfigured
9
8
  from django.db import models
10
9
  from django.http import HttpRequest
11
10
  from django.urls import Resolver404, ResolverMatch, get_resolver, get_script_prefix
@@ -266,12 +265,4 @@ def get_site_domain() -> str:
266
265
  ``COMMONGROUND_API_COMMON_GET_DOMAIN`` setting, which takes a dotted path to a
267
266
  callable taking no arguments.
268
267
  """
269
- if not apps.is_installed("django.contrib.sites"):
270
- raise ImproperlyConfigured(
271
- "'django.contrib.sites' is not installed in INSTALLED_APPS"
272
- )
273
-
274
- from django.contrib.sites.models import Site
275
-
276
- site = Site.objects.get_current()
277
- return site.domain
268
+ return settings.SITE_DOMAIN