commonground-api-common 2.5.4__tar.gz → 2.6.0__tar.gz
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.
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/CHANGELOG.rst +18 -0
- {commonground_api_common-2.5.4/commonground_api_common.egg-info → commonground_api_common-2.6.0}/PKG-INFO +1 -1
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0/commonground_api_common.egg-info}/PKG-INFO +1 -1
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/commonground_api_common.egg-info/SOURCES.txt +1 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/setup.cfg +1 -1
- commonground_api_common-2.6.0/tests/test_cached_hyperlinkrelatedfields.py +127 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/tests/test_gegevensgroepen.py +7 -1
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/tests/test_nested_serializer_validation.py +4 -4
- commonground_api_common-2.6.0/vng_api_common/__init__.py +1 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/authorizations/utils.py +1 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/conf/api.py +0 -3
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/serializers.py +117 -6
- commonground_api_common-2.5.4/vng_api_common/__init__.py +0 -1
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/MANIFEST.in +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/README.rst +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/bin/generate_schema +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/commonground_api_common.egg-info/dependency_links.txt +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/commonground_api_common.egg-info/not-zip-safe +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/commonground_api_common.egg-info/requires.txt +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/commonground_api_common.egg-info/top_level.txt +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/pyproject.toml +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/setup.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/tests/test_autorisatie_validation.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/tests/test_cache_headers.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/tests/test_check_query_params.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/tests/test_checks.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/tests/test_choices.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/tests/test_configuration_steps_applicaties.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/tests/test_configuration_steps_jwtsecrets.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/tests/test_content_type_headers.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/tests/test_field_extensions.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/tests/test_filter_extension.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/tests/test_filters.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/tests/test_get_resource.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/tests/test_jwt_decoding.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/tests/test_jwtsecrets.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/tests/test_migrations.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/tests/test_pagination.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/tests/test_permissions.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/tests/test_publish_validators.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/tests/test_schema.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/tests/test_serializer_extensions.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/tests/test_server_errors.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/tests/test_utils.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/tests/test_validators.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/tests/test_views.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/admin.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/api/__init__.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/api/permissions.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/api/serializers.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/api/urls.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/api/views.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/apps.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/audittrails/__init__.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/audittrails/admin.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/audittrails/api/__init__.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/audittrails/api/scopes.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/audittrails/api/serializers.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/audittrails/apps.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/audittrails/audits.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/audittrails/migrations/0001_initial.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/audittrails/migrations/0002_auto_20190516_0830.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/audittrails/migrations/0003_auto_20190517_0844.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/audittrails/migrations/0004_auto_20190520_1238.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/audittrails/migrations/0005_auto_20190520_1450.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/audittrails/migrations/0006_audittrail_toelichting.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/audittrails/migrations/0007_auto_20190522_0916.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/audittrails/migrations/0008_audittrail_resource_weergave.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/audittrails/migrations/0009_auto_20190712_1643.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/audittrails/migrations/0010_audittrail_request_id.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/audittrails/migrations/0011_auto_20190918_1335.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/audittrails/migrations/0012_auto_20200619_0545.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/audittrails/migrations/0012_remove_audittrail_request_id.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/audittrails/migrations/0013_audittrail_logrecord_id.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/audittrails/migrations/0013_auto_20201207_0846.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/audittrails/migrations/0014_auto_20201221_0905.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/audittrails/migrations/0014_auto_20210323_1654.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/audittrails/migrations/0015_auto_20220318_1608.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/audittrails/migrations/0016_merge_20220607_0517.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/audittrails/migrations/0017_alter_audittrail_bron.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/audittrails/migrations/0018_auto_20221212_0745.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/audittrails/migrations/__init__.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/audittrails/migrations/_operations.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/audittrails/models.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/audittrails/utils.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/audittrails/viewsets.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/authorizations/__init__.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/authorizations/admin.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/authorizations/middleware.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/authorizations/migrations/0001_initial.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/authorizations/migrations/0002_authorizationsconfig.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/authorizations/migrations/0003_auto_20190502_0409.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/authorizations/migrations/0004_auto_20190503_0941.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/authorizations/migrations/0005_auto_20190506_0842.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/authorizations/migrations/0006_auto_20190506_0901.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/authorizations/migrations/0007_auto_20190506_1212.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/authorizations/migrations/0008_auto_20190712_1541.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/authorizations/migrations/0009_update_enums.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/authorizations/migrations/0010_auto_20190712_1643.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/authorizations/migrations/0011_auto_20191114_0728.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/authorizations/migrations/0012_auto_20200619_0545.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/authorizations/migrations/0013_auto_20201207_0846.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/authorizations/migrations/0014_auto_20201221_0905.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/authorizations/migrations/0015_auto_20220318_1608.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/authorizations/migrations/0016_remove_authorizationsconfig_api_root_and_more.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/authorizations/migrations/0017_alter_applicatie_client_ids_and_more.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/authorizations/migrations/__init__.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/authorizations/models.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/authorizations/serializers.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/authorizations/validators.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/caching/__init__.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/caching/decorators.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/caching/etags.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/caching/introspection.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/caching/models.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/caching/registry.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/caching/signals.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/checks.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/choices.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/client.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/compat.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/conf/__init__.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/constants.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/contrib/__init__.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/contrib/setup_configuration/__init__.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/contrib/setup_configuration/models.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/contrib/setup_configuration/steps.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/db/__init__.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/db/operations.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/decorators.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/descriptors.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/doc.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/exception_handling.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/exceptions.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/extensions/__init__.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/extensions/file.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/extensions/gegevensgroep.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/extensions/geojson.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/extensions/hyperlink.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/extensions/polymorphic.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/extensions/query.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/fields.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/filters.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/filtersets.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/generators.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/geo.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/locale/nl/LC_MESSAGES/django.mo +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/locale/nl/LC_MESSAGES/django.po +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/middleware.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/migrations/0001_initial.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/migrations/0002_apicredential.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/migrations/0003_auto_20190417_1145.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/migrations/0004_auto_20190517_0903.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/migrations/0005_auto_20190614_1346.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/migrations/0006_delete_apicredential.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/migrations/__init__.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/mocks.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/models.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/notifications/__init__.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/notifications/api/__init__.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/notifications/api/urls.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/notifications/api/views.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/notifications/apps.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/notifications/handlers.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/notifications/migrations/0001_initial.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/notifications/migrations/0002_subscription__subscription.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/notifications/migrations/0003_auto_20190319_1048.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/notifications/migrations/0004_auto_20190325_1313.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/notifications/migrations/0005_fix_default_nrc.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/notifications/migrations/0006_auto_20190417_1142.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/notifications/migrations/0007_auto_20190429_1442.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/notifications/migrations/0008_auto_20190502_0415.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/notifications/migrations/0009_auto_20190729_0427.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/notifications/migrations/0010_auto_20220704_1419.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/notifications/migrations/0011_remove_subscription_config_and_more.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/notifications/migrations/__init__.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/oas.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/pagination.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/permissions.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/polymorphism.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/routers.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/schema.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/scopes.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/search.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/static/vng_api_common/css/admin/admin_overrides.css +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/static/vng_api_common/css/screen.css +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/static/vng_api_common/ico/favicon.png +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/static/vng_api_common/img/vng.svg +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/static/vng_api_common/libs/fontawesome/LICENSE.txt +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/static/vng_api_common/libs/fontawesome/css/all.css +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/static/vng_api_common/libs/fontawesome/css/all.min.css +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-brands-400.eot +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-brands-400.svg +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-brands-400.ttf +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-brands-400.woff +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-brands-400.woff2 +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-regular-400.eot +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-regular-400.svg +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-regular-400.ttf +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-regular-400.woff +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-regular-400.woff2 +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-solid-900.eot +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-solid-900.svg +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-solid-900.ttf +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-solid-900.woff +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-solid-900.woff2 +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/templates/vng_api_common/admin/base_site.html +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/templates/vng_api_common/includes/kanalen_card.html +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/templates/vng_api_common/index.html +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/templates/vng_api_common/master.html +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/templates/vng_api_common/ref/error_detail.html +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/templates/vng_api_common/ref/scopes.html +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/templates/vng_api_common/view_config.html +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/templatetags/__init__.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/templatetags/vng_api_common.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/tests/__init__.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/tests/auth.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/tests/caching.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/tests/schema.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/tests/urls.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/urls.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/utils.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/validators.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/version.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/views.py +0 -0
- {commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/viewsets.py +0 -0
@@ -2,6 +2,24 @@
|
|
2
2
|
Change history
|
3
3
|
==============
|
4
4
|
|
5
|
+
2.6.0 (2025-04-07)
|
6
|
+
------------------
|
7
|
+
|
8
|
+
**New features**
|
9
|
+
|
10
|
+
* [open-zaak/open-zaak#1970] Add several DRF hyperlinked field classes that cache the results of ``reverse()`` to
|
11
|
+
avoid running the same logic multiple times. This can improve performance for serialization
|
12
|
+
with hyperlinked fields by quite a bit, especially for list operations
|
13
|
+
|
14
|
+
* ``vng_api_common.serializers.CachedHyperlinkedIdentityField``
|
15
|
+
* ``vng_api_common.serializers.CachedHyperlinkedRelatedField``
|
16
|
+
* ``vng_api_common.serializers.CachedNestedHyperlinkedRelatedField``
|
17
|
+
|
18
|
+
2.5.5 (2025-03-21)
|
19
|
+
------------------
|
20
|
+
|
21
|
+
* [maykinmedia/open-api-framework#59] Remove ``SITE_DOMAIN`` default value and update docs
|
22
|
+
|
5
23
|
2.5.4 (2025-03-20)
|
6
24
|
------------------
|
7
25
|
|
@@ -13,6 +13,7 @@ commonground_api_common.egg-info/requires.txt
|
|
13
13
|
commonground_api_common.egg-info/top_level.txt
|
14
14
|
tests/test_autorisatie_validation.py
|
15
15
|
tests/test_cache_headers.py
|
16
|
+
tests/test_cached_hyperlinkrelatedfields.py
|
16
17
|
tests/test_check_query_params.py
|
17
18
|
tests/test_checks.py
|
18
19
|
tests/test_choices.py
|
@@ -0,0 +1,127 @@
|
|
1
|
+
from unittest.mock import patch
|
2
|
+
|
3
|
+
from django.urls import reverse
|
4
|
+
|
5
|
+
import pytest
|
6
|
+
from rest_framework.reverse import reverse
|
7
|
+
|
8
|
+
from testapp.factories import GroupFactory, PersonFactory
|
9
|
+
|
10
|
+
|
11
|
+
@pytest.mark.django_db
|
12
|
+
def test_cached_hyperlinkedrelatedfield(api_client):
|
13
|
+
"""
|
14
|
+
Caching is applied to the base URI for each view in CachedHyperlinkedRelatedField,
|
15
|
+
but this cache must be only be applied within the same requests, to ensure that
|
16
|
+
requests with different HTTP_HOSTs show the correct domain in their responses
|
17
|
+
"""
|
18
|
+
group = GroupFactory.create(name="group1")
|
19
|
+
person = PersonFactory.create(
|
20
|
+
name="John Doe", address_street="Foo", address_number="1", group=group
|
21
|
+
)
|
22
|
+
|
23
|
+
response = api_client.get(reverse("person-detail", kwargs={"pk": person.pk}))
|
24
|
+
|
25
|
+
expected = {
|
26
|
+
"url": f"http://testserver{reverse('person-detail', kwargs={'pk': person.pk})}",
|
27
|
+
"address": {"street": "Foo", "number": "1"},
|
28
|
+
"name": "John Doe",
|
29
|
+
"group_name": "group1",
|
30
|
+
"group_url": f"http://testserver{reverse('group-detail', kwargs={'pk': group.pk})}",
|
31
|
+
}
|
32
|
+
|
33
|
+
assert response.data == expected
|
34
|
+
|
35
|
+
response = api_client.get(
|
36
|
+
reverse("person-detail", kwargs={"pk": person.pk}), HTTP_HOST="different.local"
|
37
|
+
)
|
38
|
+
|
39
|
+
expected = {
|
40
|
+
"url": f"http://different.local{reverse('person-detail', kwargs={'pk': person.pk})}",
|
41
|
+
"address": {"street": "Foo", "number": "1"},
|
42
|
+
"name": "John Doe",
|
43
|
+
"group_name": "group1",
|
44
|
+
"group_url": f"http://different.local{reverse('group-detail', kwargs={'pk': group.pk})}",
|
45
|
+
}
|
46
|
+
|
47
|
+
assert response.data == expected
|
48
|
+
|
49
|
+
|
50
|
+
@pytest.mark.django_db
|
51
|
+
def test_cached_nested_hyperlinkedrelatedfield(api_client):
|
52
|
+
"""
|
53
|
+
Caching is applied to the base URI for each view in CachedNestedHyperlinkedRelatedField,
|
54
|
+
but this cache must be only be applied within the same requests, to ensure that
|
55
|
+
requests with different HTTP_HOSTs show the correct domain in their responses
|
56
|
+
"""
|
57
|
+
group = GroupFactory.create(name="group1")
|
58
|
+
person1 = PersonFactory.create(
|
59
|
+
name="John Doe", address_street="Foo", address_number="1", group=group
|
60
|
+
)
|
61
|
+
person2 = PersonFactory.create(
|
62
|
+
name="Jane Doe", address_street="Bar", address_number="2", group=group
|
63
|
+
)
|
64
|
+
|
65
|
+
with patch("rest_framework.relations.reverse", side_effect=reverse) as mock_reverse:
|
66
|
+
response = api_client.get(reverse("group-detail", kwargs={"pk": group.pk}))
|
67
|
+
|
68
|
+
# Without caching 6 calls would be made to reverse, caching reduces this to 3
|
69
|
+
# (one for each view)
|
70
|
+
assert mock_reverse.call_count == 3
|
71
|
+
assert mock_reverse.call_args_list[0].args == ("person-detail",)
|
72
|
+
assert mock_reverse.call_args_list[1].args == ("group-detail",)
|
73
|
+
assert mock_reverse.call_args_list[2].args == ("nested-person-detail",)
|
74
|
+
|
75
|
+
expected = {
|
76
|
+
"persons": [
|
77
|
+
{
|
78
|
+
"url": f"http://testserver{reverse('person-detail', kwargs={'pk': person1.pk})}",
|
79
|
+
"address": {"street": "Foo", "number": "1"},
|
80
|
+
"name": "John Doe",
|
81
|
+
"group_name": "group1",
|
82
|
+
"group_url": f"http://testserver{reverse('group-detail', kwargs={'pk': group.pk})}",
|
83
|
+
},
|
84
|
+
{
|
85
|
+
"url": f"http://testserver{reverse('person-detail', kwargs={'pk': person2.pk})}",
|
86
|
+
"address": {"street": "Bar", "number": "2"},
|
87
|
+
"name": "Jane Doe",
|
88
|
+
"group_name": "group1",
|
89
|
+
"group_url": f"http://testserver{reverse('group-detail', kwargs={'pk': group.pk})}",
|
90
|
+
},
|
91
|
+
],
|
92
|
+
"nested_persons": [
|
93
|
+
f"http://testserver{reverse('nested-person-detail', kwargs={'group_pk': group.pk, 'pk': person1.pk})}",
|
94
|
+
f"http://testserver{reverse('nested-person-detail', kwargs={'group_pk': group.pk, 'pk': person2.pk})}",
|
95
|
+
],
|
96
|
+
}
|
97
|
+
|
98
|
+
assert response.data == expected
|
99
|
+
|
100
|
+
response = api_client.get(
|
101
|
+
reverse("group-detail", kwargs={"pk": group.pk}), HTTP_HOST="different.local"
|
102
|
+
)
|
103
|
+
|
104
|
+
expected = {
|
105
|
+
"persons": [
|
106
|
+
{
|
107
|
+
"url": f"http://different.local{reverse('person-detail', kwargs={'pk': person1.pk})}",
|
108
|
+
"address": {"street": "Foo", "number": "1"},
|
109
|
+
"name": "John Doe",
|
110
|
+
"group_name": "group1",
|
111
|
+
"group_url": f"http://different.local{reverse('group-detail', kwargs={'pk': group.pk})}",
|
112
|
+
},
|
113
|
+
{
|
114
|
+
"url": f"http://different.local{reverse('person-detail', kwargs={'pk': person2.pk})}",
|
115
|
+
"address": {"street": "Bar", "number": "2"},
|
116
|
+
"name": "Jane Doe",
|
117
|
+
"group_name": "group1",
|
118
|
+
"group_url": f"http://different.local{reverse('group-detail', kwargs={'pk': group.pk})}",
|
119
|
+
},
|
120
|
+
],
|
121
|
+
"nested_persons": [
|
122
|
+
f"http://different.local{reverse('nested-person-detail', kwargs={'group_pk': group.pk, 'pk': person1.pk})}",
|
123
|
+
f"http://different.local{reverse('nested-person-detail', kwargs={'group_pk': group.pk, 'pk': person2.pk})}",
|
124
|
+
],
|
125
|
+
}
|
126
|
+
|
127
|
+
assert response.data == expected
|
{commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/tests/test_gegevensgroepen.py
RENAMED
@@ -1,3 +1,5 @@
|
|
1
|
+
from rest_framework.test import APIRequestFactory
|
2
|
+
|
1
3
|
from testapp.models import Group, Person
|
2
4
|
from testapp.serializers import PersonSerializer, PersonSerializer2
|
3
5
|
|
@@ -93,7 +95,11 @@ def test_assignment_missing_optional_key():
|
|
93
95
|
|
94
96
|
def test_nullable_gegevensgroep():
|
95
97
|
person = Person(name="bla", address_street="", address_number="")
|
96
|
-
|
98
|
+
factory = APIRequestFactory()
|
99
|
+
request = factory.get("/persons")
|
100
|
+
output = PersonSerializer(context={"request": request}).to_representation(
|
101
|
+
instance=person
|
102
|
+
)
|
97
103
|
assert output["address"] == {
|
98
104
|
"street": "",
|
99
105
|
"number": "",
|
@@ -43,7 +43,7 @@ def test_create_invalid_params():
|
|
43
43
|
"""
|
44
44
|
serializer = GroupSerializer(
|
45
45
|
data={
|
46
|
-
"
|
46
|
+
"persons": [
|
47
47
|
{
|
48
48
|
"name": "john",
|
49
49
|
"address": {"street": "Keizersgracht", "number": "416"},
|
@@ -59,17 +59,17 @@ def test_create_invalid_params():
|
|
59
59
|
|
60
60
|
validation_errors = list(get_validation_errors(serializer.errors))
|
61
61
|
|
62
|
-
assert validation_errors[0]["name"] == "
|
62
|
+
assert validation_errors[0]["name"] == "persons.1.address.street"
|
63
63
|
assert validation_errors[0]["code"] == "required"
|
64
64
|
|
65
|
-
assert validation_errors[1]["name"] == "
|
65
|
+
assert validation_errors[1]["name"] == "persons.2.name"
|
66
66
|
assert validation_errors[1]["code"] == "required"
|
67
67
|
|
68
68
|
|
69
69
|
def test_create_valid():
|
70
70
|
serializer = GroupSerializer(
|
71
71
|
data={
|
72
|
-
"
|
72
|
+
"persons": [
|
73
73
|
{
|
74
74
|
"name": "test",
|
75
75
|
"address": {"street": "Keizersgracht", "number": "117"},
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = "2.6.0"
|
@@ -15,7 +15,6 @@ __all__ = [
|
|
15
15
|
"NOTIFICATIONS_KANAAL",
|
16
16
|
"REDOC_SETTINGS",
|
17
17
|
"SECURITY_DEFINITION_NAME",
|
18
|
-
"SITE_DOMAIN",
|
19
18
|
]
|
20
19
|
|
21
20
|
API_VERSION = "1.0.0-rc1" # semantic version
|
@@ -99,5 +98,3 @@ COMMON_SPEC = f"https://raw.githubusercontent.com/{vng_repo}/feature/{vng_branch
|
|
99
98
|
JWT_LEEWAY = 0 # default in PyJWT
|
100
99
|
|
101
100
|
COMMONGROUND_API_COMMON_GET_DOMAIN = "vng_api_common.utils.get_site_domain"
|
102
|
-
|
103
|
-
SITE_DOMAIN = "example.com"
|
{commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/serializers.py
RENAMED
@@ -1,13 +1,17 @@
|
|
1
1
|
import datetime
|
2
2
|
import inspect
|
3
3
|
from collections import OrderedDict
|
4
|
+
from functools import reduce
|
4
5
|
from typing import List, Optional, Tuple, Union
|
5
6
|
|
6
7
|
from django.db import models, transaction
|
8
|
+
from django.db.models import Model
|
7
9
|
from django.utils.translation import gettext_lazy as _
|
8
10
|
|
9
11
|
import isodate
|
10
12
|
from rest_framework import fields, serializers
|
13
|
+
from rest_framework.request import Request
|
14
|
+
from rest_framework_nested.relations import NestedHyperlinkedRelatedField
|
11
15
|
|
12
16
|
from .choices import TextChoicesWithDescriptions
|
13
17
|
from .descriptors import GegevensGroepType
|
@@ -164,11 +168,11 @@ class GegevensGroepSerializer(
|
|
164
168
|
|
165
169
|
Usage::
|
166
170
|
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
171
|
+
>>> class VerlengingSerializer(GegevensGroepSerializer):
|
172
|
+
... class Meta:
|
173
|
+
... model = Zaak
|
174
|
+
... gegevensgroep = 'verlenging'
|
175
|
+
>>>
|
172
176
|
|
173
177
|
Where ``Zaak.verlenging`` is a :class:``GegevensGroepType``.
|
174
178
|
"""
|
@@ -275,7 +279,77 @@ class NestedGegevensGroepMixin:
|
|
275
279
|
return super().update(instance, validated_data)
|
276
280
|
|
277
281
|
|
278
|
-
|
282
|
+
def get_nested_fk_attribute(instance, relation_path):
|
283
|
+
"""
|
284
|
+
Retrieves an attribute from a nested foreign key relation.
|
285
|
+
|
286
|
+
Args:
|
287
|
+
- instance: The model instance (e.g., Book).
|
288
|
+
- relation_path: A string with the relation path, e.g., 'author__publisher__name'.
|
289
|
+
|
290
|
+
Returns:
|
291
|
+
- The value of the nested attribute or None if not found.
|
292
|
+
"""
|
293
|
+
relations = relation_path.split("__")
|
294
|
+
|
295
|
+
return reduce(
|
296
|
+
lambda obj, attr: getattr(obj, attr, None) if obj else None, relations, instance
|
297
|
+
)
|
298
|
+
|
299
|
+
|
300
|
+
class CacheMixin:
|
301
|
+
"""
|
302
|
+
Mixin for Hyperlinked DRF fields to cache the base URI per view, to avoid
|
303
|
+
having to recalculate this for each related object that has to be serialized
|
304
|
+
|
305
|
+
This cache is stored on the field instance itself, so it's reset between requests
|
306
|
+
"""
|
307
|
+
|
308
|
+
lookup_url_kwarg = "" # Should be defined on `HyperlinkedRelatedField`
|
309
|
+
identifier_placeholder = "id-placeholder"
|
310
|
+
|
311
|
+
def get_extra_reverse_kwargs(self) -> dict[str, str]:
|
312
|
+
"""
|
313
|
+
Hook to inject extra kwargs to be passed to `reverse()`
|
314
|
+
"""
|
315
|
+
return {}
|
316
|
+
|
317
|
+
def __init__(self, *args, **kwargs):
|
318
|
+
super().__init__(*args, **kwargs)
|
319
|
+
|
320
|
+
self._reverse_cache = {}
|
321
|
+
|
322
|
+
def get_url(
|
323
|
+
self, obj: Model, view_name: str, request: Request, format: str | None
|
324
|
+
) -> str | None:
|
325
|
+
# Unsaved objects will not yet have a valid URL.
|
326
|
+
if hasattr(obj, "pk") and obj.pk in (None, ""):
|
327
|
+
return None
|
328
|
+
|
329
|
+
base_url = self._reverse_cache.get(view_name)
|
330
|
+
|
331
|
+
if base_url is None:
|
332
|
+
# If not cached, compute and cache it for this request cycle
|
333
|
+
try:
|
334
|
+
# Insert placeholders for identifiers, these will be replaced by
|
335
|
+
# real identifiers later on
|
336
|
+
kwargs = {self.lookup_url_kwarg: self.identifier_placeholder}
|
337
|
+
kwargs.update(self.get_extra_reverse_kwargs())
|
338
|
+
|
339
|
+
base_url = self.reverse(
|
340
|
+
view_name, kwargs=kwargs, request=request, format=format
|
341
|
+
)
|
342
|
+
self._reverse_cache[view_name] = base_url
|
343
|
+
except Exception as e:
|
344
|
+
raise ValueError(f"Could not resolve reverse for {view_name}: {e}")
|
345
|
+
|
346
|
+
url = base_url.replace(
|
347
|
+
self.identifier_placeholder, str(getattr(obj, self.lookup_url_kwarg))
|
348
|
+
)
|
349
|
+
return url
|
350
|
+
|
351
|
+
|
352
|
+
class LengthHyperlinkedRelatedField(CacheMixin, serializers.HyperlinkedRelatedField):
|
279
353
|
default_error_messages = {
|
280
354
|
"max_length": _("Ensure this field has no more than {max_length} characters."),
|
281
355
|
"min_length": _("Ensure this field has at least {min_length} characters."),
|
@@ -296,3 +370,40 @@ class LengthHyperlinkedRelatedField(serializers.HyperlinkedRelatedField):
|
|
296
370
|
self.fail("min_length", max_length=self.min_length, length=len(data))
|
297
371
|
|
298
372
|
return super().to_internal_value(data)
|
373
|
+
|
374
|
+
|
375
|
+
class CachedHyperlinkedRelatedField(CacheMixin, serializers.HyperlinkedRelatedField):
|
376
|
+
"""
|
377
|
+
Subclass of ``serializers.HyperlinkedRelatedField`` that applies caching in
|
378
|
+
``.get_url()`` to ``reverse()`` calls to improve serialization performance
|
379
|
+
"""
|
380
|
+
|
381
|
+
|
382
|
+
class CachedHyperlinkedIdentityField(CacheMixin, serializers.HyperlinkedIdentityField):
|
383
|
+
"""
|
384
|
+
Subclass of ``serializers.HyperlinkedIdentityField`` that applies caching in
|
385
|
+
``.get_url()`` to ``reverse()`` calls to improve serialization performance
|
386
|
+
"""
|
387
|
+
|
388
|
+
|
389
|
+
class CachedNestedHyperlinkedRelatedField(CacheMixin, NestedHyperlinkedRelatedField):
|
390
|
+
"""
|
391
|
+
Subclass of ``serializers.HyperlinkedIdentityField`` that applies caching in
|
392
|
+
``.get_url()`` to ``reverse()`` calls to improve serialization performance
|
393
|
+
"""
|
394
|
+
|
395
|
+
def get_extra_reverse_kwargs(self) -> dict[str, str]:
|
396
|
+
return self.parent_lookup_kwargs
|
397
|
+
|
398
|
+
def get_url(
|
399
|
+
self, obj: Model, view_name: str, request: Request, format: str | None
|
400
|
+
) -> str | None:
|
401
|
+
url = super().get_url(obj, view_name, request, format)
|
402
|
+
|
403
|
+
if not url:
|
404
|
+
return None
|
405
|
+
|
406
|
+
# Replace the placeholder from the cached base URI with the actual identifier
|
407
|
+
for k, v in self.parent_lookup_kwargs.items():
|
408
|
+
url = url.replace(v, str(get_nested_fk_attribute(obj, v)))
|
409
|
+
return url
|
@@ -1 +0,0 @@
|
|
1
|
-
__version__ = "2.5.4"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/tests/test_autorisatie_validation.py
RENAMED
File without changes
|
File without changes
|
{commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/tests/test_check_query_params.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/tests/test_content_type_headers.py
RENAMED
File without changes
|
{commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/tests/test_field_extensions.py
RENAMED
File without changes
|
{commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/tests/test_filter_extension.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/tests/test_publish_validators.py
RENAMED
File without changes
|
File without changes
|
{commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/tests/test_serializer_extensions.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/api/__init__.py
RENAMED
File without changes
|
{commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/api/permissions.py
RENAMED
File without changes
|
{commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/api/serializers.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/audittrails/admin.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/audittrails/apps.py
RENAMED
File without changes
|
{commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/audittrails/audits.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/audittrails/models.py
RENAMED
File without changes
|
{commonground_api_common-2.5.4 → commonground_api_common-2.6.0}/vng_api_common/audittrails/utils.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|