From d77f426973dbeba1ec5309920c3af0f8b88fb38f Mon Sep 17 00:00:00 2001 From: bart-maykin Date: Wed, 18 Oct 2023 11:39:04 +0200 Subject: [PATCH] :truck: [#59] moved the old api to legacy file --- .../components/contactmomenten/__init__.py | 1 - src/openklant/components/klanten/__init__.py | 1 - .../api => legacy}/__init__.py | 0 .../legacy/contactmomenten/__init__.py | 3 + .../{ => legacy}/contactmomenten/admin.py | 0 .../contactmomenten/api}/__init__.py | 0 .../contactmomenten/api/audits.py | 0 .../{ => legacy}/contactmomenten/api/auth.py | 0 .../contactmomenten/api/filters.py | 2 +- .../contactmomenten/api/kanalen.py | 4 +- .../contactmomenten/api/schema.py | 0 .../contactmomenten/api/scopes.py | 0 .../contactmomenten/api/serializers.py | 4 +- .../contactmomenten/api/tests}/__init__.py | 0 .../contactmomenten/api/tests/test_auth.py | 2 +- .../api/tests/test_contactmoment.py | 8 +- .../api/tests/test_klantcontactmoment.py | 9 +- .../api/tests/test_objectcontactmoment.py | 6 +- .../contactmomenten/api/tests/test_urls.py | 0 .../contactmomenten/api/tests/views.py | 0 .../{ => legacy}/contactmomenten/api/urls.py | 0 .../{ => legacy}/contactmomenten/api/utils.py | 0 .../contactmomenten/api/validators.py | 2 +- .../contactmomenten/api/viewsets.py | 0 .../{ => legacy}/contactmomenten/apps.py | 2 +- .../migrations/0001_initial.py | 0 .../0002_klantcontactmoment_gelezen.py | 0 .../contactmomenten/migrations}/__init__.py | 0 .../contactmomenten/models}/__init__.py | 0 .../contactmomenten/models/constants.py | 0 .../contactmomenten/models/contactmomenten.py | 0 .../models/migrations}/__init__.py | 0 .../contactmomenten/models}/tests/__init__.py | 0 .../contactmomenten/models/tests/factories.py | 0 .../test_audittrail_unique_representation.py | 0 .../{ => legacy}/contactmomenten/openapi.yaml | 0 .../{ => legacy}/contactmomenten/resources.md | 0 .../contactmomenten/swagger2.0.json | 0 .../contactmomenten/tests}/__init__.py | 0 .../contactmomenten/tests/test_audittrails.py | 6 +- .../tests/test_notifications_kanaal.py | 4 +- .../tests/test_notifications_send.py | 4 +- .../contactmomenten/tests/utils.py | 0 .../components/legacy/klanten/__init__.py | 1 + .../components/{ => legacy}/klanten/admin.py | 0 .../tests => legacy/klanten/api}/__init__.py | 0 .../{ => legacy}/klanten/api/audits.py | 0 .../{ => legacy}/klanten/api/auth.py | 0 .../{ => legacy}/klanten/api/filters.py | 0 .../{ => legacy}/klanten/api/kanalen.py | 2 +- .../{ => legacy}/klanten/api/schema.py | 0 .../{ => legacy}/klanten/api/scopes.py | 0 .../{ => legacy}/klanten/api/serializers.py | 7 +- .../klanten/api/tests}/__init__.py | 0 .../klanten/api/tests/test_auth.py | 8 +- .../klanten/api/tests/test_klant.py | 9 +- .../klanten/api/tests/test_urls.py | 0 .../{ => legacy}/klanten/api/tests/views.py | 0 .../{ => legacy}/klanten/api/urls.py | 0 .../{ => legacy}/klanten/api/utils.py | 0 .../{ => legacy}/klanten/api/viewsets.py | 2 +- .../components/{ => legacy}/klanten/apps.py | 2 +- .../klanten/migrations/0001_initial.py | 0 .../migrations/0002_klant_aanmaakkanaal.py | 0 .../migrations/0003_auto_20211217_0958.py | 0 .../migrations/0004_klant_geverifieerd.py | 0 .../migrations/0005_auto_20230905_1215.py | 0 .../klanten/migrations}/__init__.py | 0 .../klanten/models}/__init__.py | 0 .../{ => legacy}/klanten/models/constants.py | 0 .../{ => legacy}/klanten/models/klanten.py | 0 .../klanten/models/migrations}/__init__.py | 0 .../klanten/models}/tests/__init__.py | 0 .../klanten/models/tests/factories.py | 0 .../test_audittrail_unique_representation.py | 0 .../{ => legacy}/klanten/openapi.yaml | 0 .../{ => legacy}/klanten/resources.md | 0 .../{ => legacy}/klanten/swagger2.0.json | 0 .../legacy/klanten/tests/__init__.py | 0 .../klanten/tests/test_audittrails.py | 0 .../tests/test_notifications_kanaal.py | 0 .../klanten/tests/test_notifications_send.py | 0 .../{ => legacy}/klanten/tests/utils.py | 0 src/openklant/conf/api.py | 3 +- src/openklant/conf/base.py | 20 ++- .../fixtures/default_admin_index.json | 134 ++++++++---------- src/openklant/urls.py | 5 +- src/openklant/utils/tests/test_version.py | 2 +- 88 files changed, 137 insertions(+), 116 deletions(-) delete mode 100644 src/openklant/components/contactmomenten/__init__.py delete mode 100644 src/openklant/components/klanten/__init__.py rename src/openklant/components/{contactmomenten/api => legacy}/__init__.py (100%) create mode 100644 src/openklant/components/legacy/contactmomenten/__init__.py rename src/openklant/components/{ => legacy}/contactmomenten/admin.py (100%) rename src/openklant/components/{contactmomenten/api/tests => legacy/contactmomenten/api}/__init__.py (100%) rename src/openklant/components/{ => legacy}/contactmomenten/api/audits.py (100%) rename src/openklant/components/{ => legacy}/contactmomenten/api/auth.py (100%) rename src/openklant/components/{ => legacy}/contactmomenten/api/filters.py (98%) rename src/openklant/components/{ => legacy}/contactmomenten/api/kanalen.py (71%) rename src/openklant/components/{ => legacy}/contactmomenten/api/schema.py (100%) rename src/openklant/components/{ => legacy}/contactmomenten/api/scopes.py (100%) rename src/openklant/components/{ => legacy}/contactmomenten/api/serializers.py (97%) rename src/openklant/components/{contactmomenten/migrations => legacy/contactmomenten/api/tests}/__init__.py (100%) rename src/openklant/components/{ => legacy}/contactmomenten/api/tests/test_auth.py (90%) rename src/openklant/components/{ => legacy}/contactmomenten/api/tests/test_contactmoment.py (99%) rename src/openklant/components/{ => legacy}/contactmomenten/api/tests/test_klantcontactmoment.py (97%) rename src/openklant/components/{ => legacy}/contactmomenten/api/tests/test_objectcontactmoment.py (97%) rename src/openklant/components/{ => legacy}/contactmomenten/api/tests/test_urls.py (100%) rename src/openklant/components/{ => legacy}/contactmomenten/api/tests/views.py (100%) rename src/openklant/components/{ => legacy}/contactmomenten/api/urls.py (100%) rename src/openklant/components/{ => legacy}/contactmomenten/api/utils.py (100%) rename src/openklant/components/{ => legacy}/contactmomenten/api/validators.py (97%) rename src/openklant/components/{ => legacy}/contactmomenten/api/viewsets.py (100%) rename src/openklant/components/{ => legacy}/contactmomenten/apps.py (57%) rename src/openklant/components/{ => legacy}/contactmomenten/migrations/0001_initial.py (100%) rename src/openklant/components/{ => legacy}/contactmomenten/migrations/0002_klantcontactmoment_gelezen.py (100%) rename src/openklant/components/{contactmomenten/models => legacy/contactmomenten/migrations}/__init__.py (100%) rename src/openklant/components/{contactmomenten/models/migrations => legacy/contactmomenten/models}/__init__.py (100%) rename src/openklant/components/{ => legacy}/contactmomenten/models/constants.py (100%) rename src/openklant/components/{ => legacy}/contactmomenten/models/contactmomenten.py (100%) rename src/openklant/components/{contactmomenten/models/tests => legacy/contactmomenten/models/migrations}/__init__.py (100%) rename src/openklant/components/{contactmomenten => legacy/contactmomenten/models}/tests/__init__.py (100%) rename src/openklant/components/{ => legacy}/contactmomenten/models/tests/factories.py (100%) rename src/openklant/components/{ => legacy}/contactmomenten/models/tests/test_audittrail_unique_representation.py (100%) rename src/openklant/components/{ => legacy}/contactmomenten/openapi.yaml (100%) rename src/openklant/components/{ => legacy}/contactmomenten/resources.md (100%) rename src/openklant/components/{ => legacy}/contactmomenten/swagger2.0.json (100%) rename src/openklant/components/{klanten/api => legacy/contactmomenten/tests}/__init__.py (100%) rename src/openklant/components/{ => legacy}/contactmomenten/tests/test_audittrails.py (95%) rename src/openklant/components/{ => legacy}/contactmomenten/tests/test_notifications_kanaal.py (96%) rename src/openklant/components/{ => legacy}/contactmomenten/tests/test_notifications_send.py (95%) rename src/openklant/components/{ => legacy}/contactmomenten/tests/utils.py (100%) create mode 100644 src/openklant/components/legacy/klanten/__init__.py rename src/openklant/components/{ => legacy}/klanten/admin.py (100%) rename src/openklant/components/{klanten/api/tests => legacy/klanten/api}/__init__.py (100%) rename src/openklant/components/{ => legacy}/klanten/api/audits.py (100%) rename src/openklant/components/{ => legacy}/klanten/api/auth.py (100%) rename src/openklant/components/{ => legacy}/klanten/api/filters.py (100%) rename src/openklant/components/{ => legacy}/klanten/api/kanalen.py (75%) rename src/openklant/components/{ => legacy}/klanten/api/schema.py (100%) rename src/openklant/components/{ => legacy}/klanten/api/scopes.py (100%) rename src/openklant/components/{ => legacy}/klanten/api/serializers.py (98%) rename src/openklant/components/{klanten/migrations => legacy/klanten/api/tests}/__init__.py (100%) rename src/openklant/components/{ => legacy}/klanten/api/tests/test_auth.py (87%) rename src/openklant/components/{ => legacy}/klanten/api/tests/test_klant.py (99%) rename src/openklant/components/{ => legacy}/klanten/api/tests/test_urls.py (100%) rename src/openklant/components/{ => legacy}/klanten/api/tests/views.py (100%) rename src/openklant/components/{ => legacy}/klanten/api/urls.py (100%) rename src/openklant/components/{ => legacy}/klanten/api/utils.py (100%) rename src/openklant/components/{ => legacy}/klanten/api/viewsets.py (97%) rename src/openklant/components/{ => legacy}/klanten/apps.py (58%) rename src/openklant/components/{ => legacy}/klanten/migrations/0001_initial.py (100%) rename src/openklant/components/{ => legacy}/klanten/migrations/0002_klant_aanmaakkanaal.py (100%) rename src/openklant/components/{ => legacy}/klanten/migrations/0003_auto_20211217_0958.py (100%) rename src/openklant/components/{ => legacy}/klanten/migrations/0004_klant_geverifieerd.py (100%) rename src/openklant/components/{ => legacy}/klanten/migrations/0005_auto_20230905_1215.py (100%) rename src/openklant/components/{klanten/models => legacy/klanten/migrations}/__init__.py (100%) rename src/openklant/components/{klanten/models/migrations => legacy/klanten/models}/__init__.py (100%) rename src/openklant/components/{ => legacy}/klanten/models/constants.py (100%) rename src/openklant/components/{ => legacy}/klanten/models/klanten.py (100%) rename src/openklant/components/{klanten/models/tests => legacy/klanten/models/migrations}/__init__.py (100%) rename src/openklant/components/{klanten => legacy/klanten/models}/tests/__init__.py (100%) rename src/openklant/components/{ => legacy}/klanten/models/tests/factories.py (100%) rename src/openklant/components/{ => legacy}/klanten/models/tests/test_audittrail_unique_representation.py (100%) rename src/openklant/components/{ => legacy}/klanten/openapi.yaml (100%) rename src/openklant/components/{ => legacy}/klanten/resources.md (100%) rename src/openklant/components/{ => legacy}/klanten/swagger2.0.json (100%) create mode 100644 src/openklant/components/legacy/klanten/tests/__init__.py rename src/openklant/components/{ => legacy}/klanten/tests/test_audittrails.py (100%) rename src/openklant/components/{ => legacy}/klanten/tests/test_notifications_kanaal.py (100%) rename src/openklant/components/{ => legacy}/klanten/tests/test_notifications_send.py (100%) rename src/openklant/components/{ => legacy}/klanten/tests/utils.py (100%) diff --git a/src/openklant/components/contactmomenten/__init__.py b/src/openklant/components/contactmomenten/__init__.py deleted file mode 100644 index dcf452a4..00000000 --- a/src/openklant/components/contactmomenten/__init__.py +++ /dev/null @@ -1 +0,0 @@ -default_app_config = "openklant.components.contactmomenten.apps.ContactmomentenConfig" diff --git a/src/openklant/components/klanten/__init__.py b/src/openklant/components/klanten/__init__.py deleted file mode 100644 index 71cbe7e4..00000000 --- a/src/openklant/components/klanten/__init__.py +++ /dev/null @@ -1 +0,0 @@ -default_app_config = "openklant.components.klanten.apps.KlantenConfig" diff --git a/src/openklant/components/contactmomenten/api/__init__.py b/src/openklant/components/legacy/__init__.py similarity index 100% rename from src/openklant/components/contactmomenten/api/__init__.py rename to src/openklant/components/legacy/__init__.py diff --git a/src/openklant/components/legacy/contactmomenten/__init__.py b/src/openklant/components/legacy/contactmomenten/__init__.py new file mode 100644 index 00000000..d126caf5 --- /dev/null +++ b/src/openklant/components/legacy/contactmomenten/__init__.py @@ -0,0 +1,3 @@ +default_app_config = ( + "openklant.components.legacy.contactmomenten.apps.ContactmomentenConfig" +) diff --git a/src/openklant/components/contactmomenten/admin.py b/src/openklant/components/legacy/contactmomenten/admin.py similarity index 100% rename from src/openklant/components/contactmomenten/admin.py rename to src/openklant/components/legacy/contactmomenten/admin.py diff --git a/src/openklant/components/contactmomenten/api/tests/__init__.py b/src/openklant/components/legacy/contactmomenten/api/__init__.py similarity index 100% rename from src/openklant/components/contactmomenten/api/tests/__init__.py rename to src/openklant/components/legacy/contactmomenten/api/__init__.py diff --git a/src/openklant/components/contactmomenten/api/audits.py b/src/openklant/components/legacy/contactmomenten/api/audits.py similarity index 100% rename from src/openklant/components/contactmomenten/api/audits.py rename to src/openklant/components/legacy/contactmomenten/api/audits.py diff --git a/src/openklant/components/contactmomenten/api/auth.py b/src/openklant/components/legacy/contactmomenten/api/auth.py similarity index 100% rename from src/openklant/components/contactmomenten/api/auth.py rename to src/openklant/components/legacy/contactmomenten/api/auth.py diff --git a/src/openklant/components/contactmomenten/api/filters.py b/src/openklant/components/legacy/contactmomenten/api/filters.py similarity index 98% rename from src/openklant/components/contactmomenten/api/filters.py rename to src/openklant/components/legacy/contactmomenten/api/filters.py index d87f7c71..5fca4b20 100644 --- a/src/openklant/components/contactmomenten/api/filters.py +++ b/src/openklant/components/legacy/contactmomenten/api/filters.py @@ -5,7 +5,7 @@ from vng_api_common.filtersets import FilterSet from vng_api_common.utils import get_help_text -from openklant.components.contactmomenten.models.contactmomenten import ( +from openklant.components.legacy.contactmomenten.models.contactmomenten import ( ContactMoment, KlantContactMoment, ObjectContactMoment, diff --git a/src/openklant/components/contactmomenten/api/kanalen.py b/src/openklant/components/legacy/contactmomenten/api/kanalen.py similarity index 71% rename from src/openklant/components/contactmomenten/api/kanalen.py rename to src/openklant/components/legacy/contactmomenten/api/kanalen.py index 537fe0c1..6b9b150e 100644 --- a/src/openklant/components/contactmomenten/api/kanalen.py +++ b/src/openklant/components/legacy/contactmomenten/api/kanalen.py @@ -2,7 +2,9 @@ from notifications_api_common.kanalen import Kanaal -from openklant.components.contactmomenten.models.contactmomenten import ContactMoment +from openklant.components.legacy.contactmomenten.models.contactmomenten import ( + ContactMoment, +) KANAAL_CONTACTMOMENTEN = Kanaal( settings.CONTACTMOMENTEN_NOTIFICATIONS_KANAAL, diff --git a/src/openklant/components/contactmomenten/api/schema.py b/src/openklant/components/legacy/contactmomenten/api/schema.py similarity index 100% rename from src/openklant/components/contactmomenten/api/schema.py rename to src/openklant/components/legacy/contactmomenten/api/schema.py diff --git a/src/openklant/components/contactmomenten/api/scopes.py b/src/openklant/components/legacy/contactmomenten/api/scopes.py similarity index 100% rename from src/openklant/components/contactmomenten/api/scopes.py rename to src/openklant/components/legacy/contactmomenten/api/scopes.py diff --git a/src/openklant/components/contactmomenten/api/serializers.py b/src/openklant/components/legacy/contactmomenten/api/serializers.py similarity index 97% rename from src/openklant/components/contactmomenten/api/serializers.py rename to src/openklant/components/legacy/contactmomenten/api/serializers.py index b125df74..b98266cc 100644 --- a/src/openklant/components/contactmomenten/api/serializers.py +++ b/src/openklant/components/legacy/contactmomenten/api/serializers.py @@ -8,8 +8,8 @@ from vng_api_common.serializers import add_choice_values_help_text from vng_api_common.validators import IsImmutableValidator, URLValidator -from openklant.components.contactmomenten.models.constants import ObjectTypes -from openklant.components.contactmomenten.models.contactmomenten import ( +from openklant.components.legacy.contactmomenten.models.constants import ObjectTypes +from openklant.components.legacy.contactmomenten.models.contactmomenten import ( ContactMoment, KlantContactMoment, Medewerker, diff --git a/src/openklant/components/contactmomenten/migrations/__init__.py b/src/openklant/components/legacy/contactmomenten/api/tests/__init__.py similarity index 100% rename from src/openklant/components/contactmomenten/migrations/__init__.py rename to src/openklant/components/legacy/contactmomenten/api/tests/__init__.py diff --git a/src/openklant/components/contactmomenten/api/tests/test_auth.py b/src/openklant/components/legacy/contactmomenten/api/tests/test_auth.py similarity index 90% rename from src/openklant/components/contactmomenten/api/tests/test_auth.py rename to src/openklant/components/legacy/contactmomenten/api/tests/test_auth.py index ed96749f..abe31e56 100644 --- a/src/openklant/components/contactmomenten/api/tests/test_auth.py +++ b/src/openklant/components/legacy/contactmomenten/api/tests/test_auth.py @@ -4,7 +4,7 @@ from rest_framework.test import APITestCase from vng_api_common.tests import AuthCheckMixin, reverse -from openklant.components.contactmomenten.models.tests.factories import ( +from openklant.components.legacy.contactmomenten.models.tests.factories import ( ContactMomentFactory, ) diff --git a/src/openklant/components/contactmomenten/api/tests/test_contactmoment.py b/src/openklant/components/legacy/contactmomenten/api/tests/test_contactmoment.py similarity index 99% rename from src/openklant/components/contactmomenten/api/tests/test_contactmoment.py rename to src/openklant/components/legacy/contactmomenten/api/tests/test_contactmoment.py index 7fc2e889..fa582fa9 100644 --- a/src/openklant/components/contactmomenten/api/tests/test_contactmoment.py +++ b/src/openklant/components/legacy/contactmomenten/api/tests/test_contactmoment.py @@ -7,9 +7,11 @@ from vng_api_common.constants import ComponentTypes from vng_api_common.tests import JWTAuthMixin, get_validation_errors, reverse -from openklant.components.contactmomenten.models.constants import InitiatiefNemer -from openklant.components.contactmomenten.models.contactmomenten import ContactMoment -from openklant.components.contactmomenten.models.tests.factories import ( +from openklant.components.legacy.contactmomenten.models.constants import InitiatiefNemer +from openklant.components.legacy.contactmomenten.models.contactmomenten import ( + ContactMoment, +) +from openklant.components.legacy.contactmomenten.models.tests.factories import ( ContactMomentFactory, KlantContactMomentFactory, MedewerkerFactory, diff --git a/src/openklant/components/contactmomenten/api/tests/test_klantcontactmoment.py b/src/openklant/components/legacy/contactmomenten/api/tests/test_klantcontactmoment.py similarity index 97% rename from src/openklant/components/contactmomenten/api/tests/test_klantcontactmoment.py rename to src/openklant/components/legacy/contactmomenten/api/tests/test_klantcontactmoment.py index 04e2040e..7c21cd3f 100644 --- a/src/openklant/components/contactmomenten/api/tests/test_klantcontactmoment.py +++ b/src/openklant/components/legacy/contactmomenten/api/tests/test_klantcontactmoment.py @@ -8,11 +8,14 @@ from vng_api_common.models import APICredential from vng_api_common.tests import JWTAuthMixin, get_validation_errors, reverse -from openklant.components.contactmomenten.models.constants import InitiatiefNemer, Rol -from openklant.components.contactmomenten.models.contactmomenten import ( +from openklant.components.legacy.contactmomenten.models.constants import ( + InitiatiefNemer, + Rol, +) +from openklant.components.legacy.contactmomenten.models.contactmomenten import ( KlantContactMoment, ) -from openklant.components.contactmomenten.models.tests.factories import ( +from openklant.components.legacy.contactmomenten.models.tests.factories import ( ContactMomentFactory, KlantContactMomentFactory, ) diff --git a/src/openklant/components/contactmomenten/api/tests/test_objectcontactmoment.py b/src/openklant/components/legacy/contactmomenten/api/tests/test_objectcontactmoment.py similarity index 97% rename from src/openklant/components/contactmomenten/api/tests/test_objectcontactmoment.py rename to src/openklant/components/legacy/contactmomenten/api/tests/test_objectcontactmoment.py index fe8a71a5..53d2ce50 100644 --- a/src/openklant/components/contactmomenten/api/tests/test_objectcontactmoment.py +++ b/src/openklant/components/legacy/contactmomenten/api/tests/test_objectcontactmoment.py @@ -8,11 +8,11 @@ from vng_api_common.tests import JWTAuthMixin, get_validation_errors, reverse from zds_client.tests.mocks import mock_client -from openklant.components.contactmomenten.models.constants import ObjectTypes -from openklant.components.contactmomenten.models.contactmomenten import ( +from openklant.components.legacy.contactmomenten.models.constants import ObjectTypes +from openklant.components.legacy.contactmomenten.models.contactmomenten import ( ObjectContactMoment, ) -from openklant.components.contactmomenten.models.tests.factories import ( +from openklant.components.legacy.contactmomenten.models.tests.factories import ( ContactMomentFactory, ObjectContactMomentFactory, ) diff --git a/src/openklant/components/contactmomenten/api/tests/test_urls.py b/src/openklant/components/legacy/contactmomenten/api/tests/test_urls.py similarity index 100% rename from src/openklant/components/contactmomenten/api/tests/test_urls.py rename to src/openklant/components/legacy/contactmomenten/api/tests/test_urls.py diff --git a/src/openklant/components/contactmomenten/api/tests/views.py b/src/openklant/components/legacy/contactmomenten/api/tests/views.py similarity index 100% rename from src/openklant/components/contactmomenten/api/tests/views.py rename to src/openklant/components/legacy/contactmomenten/api/tests/views.py diff --git a/src/openklant/components/contactmomenten/api/urls.py b/src/openklant/components/legacy/contactmomenten/api/urls.py similarity index 100% rename from src/openklant/components/contactmomenten/api/urls.py rename to src/openklant/components/legacy/contactmomenten/api/urls.py diff --git a/src/openklant/components/contactmomenten/api/utils.py b/src/openklant/components/legacy/contactmomenten/api/utils.py similarity index 100% rename from src/openklant/components/contactmomenten/api/utils.py rename to src/openklant/components/legacy/contactmomenten/api/utils.py diff --git a/src/openklant/components/contactmomenten/api/validators.py b/src/openklant/components/legacy/contactmomenten/api/validators.py similarity index 97% rename from src/openklant/components/contactmomenten/api/validators.py rename to src/openklant/components/legacy/contactmomenten/api/validators.py index cbcdb2d6..d8062763 100644 --- a/src/openklant/components/contactmomenten/api/validators.py +++ b/src/openklant/components/legacy/contactmomenten/api/validators.py @@ -9,7 +9,7 @@ from vng_api_common.validators import ResourceValidator from zds_client import ClientError -from openklant.components.contactmomenten.models.contactmomenten import ( +from openklant.components.legacy.contactmomenten.models.contactmomenten import ( ObjectContactMoment, ) diff --git a/src/openklant/components/contactmomenten/api/viewsets.py b/src/openklant/components/legacy/contactmomenten/api/viewsets.py similarity index 100% rename from src/openklant/components/contactmomenten/api/viewsets.py rename to src/openklant/components/legacy/contactmomenten/api/viewsets.py diff --git a/src/openklant/components/contactmomenten/apps.py b/src/openklant/components/legacy/contactmomenten/apps.py similarity index 57% rename from src/openklant/components/contactmomenten/apps.py rename to src/openklant/components/legacy/contactmomenten/apps.py index ff88d7f3..4670c9df 100644 --- a/src/openklant/components/contactmomenten/apps.py +++ b/src/openklant/components/legacy/contactmomenten/apps.py @@ -2,4 +2,4 @@ class ContactmomentenConfig(AppConfig): - name = "openklant.components.contactmomenten" + name = "openklant.components.legacy.contactmomenten" diff --git a/src/openklant/components/contactmomenten/migrations/0001_initial.py b/src/openklant/components/legacy/contactmomenten/migrations/0001_initial.py similarity index 100% rename from src/openklant/components/contactmomenten/migrations/0001_initial.py rename to src/openklant/components/legacy/contactmomenten/migrations/0001_initial.py diff --git a/src/openklant/components/contactmomenten/migrations/0002_klantcontactmoment_gelezen.py b/src/openklant/components/legacy/contactmomenten/migrations/0002_klantcontactmoment_gelezen.py similarity index 100% rename from src/openklant/components/contactmomenten/migrations/0002_klantcontactmoment_gelezen.py rename to src/openklant/components/legacy/contactmomenten/migrations/0002_klantcontactmoment_gelezen.py diff --git a/src/openklant/components/contactmomenten/models/__init__.py b/src/openklant/components/legacy/contactmomenten/migrations/__init__.py similarity index 100% rename from src/openklant/components/contactmomenten/models/__init__.py rename to src/openklant/components/legacy/contactmomenten/migrations/__init__.py diff --git a/src/openklant/components/contactmomenten/models/migrations/__init__.py b/src/openklant/components/legacy/contactmomenten/models/__init__.py similarity index 100% rename from src/openklant/components/contactmomenten/models/migrations/__init__.py rename to src/openklant/components/legacy/contactmomenten/models/__init__.py diff --git a/src/openklant/components/contactmomenten/models/constants.py b/src/openklant/components/legacy/contactmomenten/models/constants.py similarity index 100% rename from src/openklant/components/contactmomenten/models/constants.py rename to src/openklant/components/legacy/contactmomenten/models/constants.py diff --git a/src/openklant/components/contactmomenten/models/contactmomenten.py b/src/openklant/components/legacy/contactmomenten/models/contactmomenten.py similarity index 100% rename from src/openklant/components/contactmomenten/models/contactmomenten.py rename to src/openklant/components/legacy/contactmomenten/models/contactmomenten.py diff --git a/src/openklant/components/contactmomenten/models/tests/__init__.py b/src/openklant/components/legacy/contactmomenten/models/migrations/__init__.py similarity index 100% rename from src/openklant/components/contactmomenten/models/tests/__init__.py rename to src/openklant/components/legacy/contactmomenten/models/migrations/__init__.py diff --git a/src/openklant/components/contactmomenten/tests/__init__.py b/src/openklant/components/legacy/contactmomenten/models/tests/__init__.py similarity index 100% rename from src/openklant/components/contactmomenten/tests/__init__.py rename to src/openklant/components/legacy/contactmomenten/models/tests/__init__.py diff --git a/src/openklant/components/contactmomenten/models/tests/factories.py b/src/openklant/components/legacy/contactmomenten/models/tests/factories.py similarity index 100% rename from src/openklant/components/contactmomenten/models/tests/factories.py rename to src/openklant/components/legacy/contactmomenten/models/tests/factories.py diff --git a/src/openklant/components/contactmomenten/models/tests/test_audittrail_unique_representation.py b/src/openklant/components/legacy/contactmomenten/models/tests/test_audittrail_unique_representation.py similarity index 100% rename from src/openklant/components/contactmomenten/models/tests/test_audittrail_unique_representation.py rename to src/openklant/components/legacy/contactmomenten/models/tests/test_audittrail_unique_representation.py diff --git a/src/openklant/components/contactmomenten/openapi.yaml b/src/openklant/components/legacy/contactmomenten/openapi.yaml similarity index 100% rename from src/openklant/components/contactmomenten/openapi.yaml rename to src/openklant/components/legacy/contactmomenten/openapi.yaml diff --git a/src/openklant/components/contactmomenten/resources.md b/src/openklant/components/legacy/contactmomenten/resources.md similarity index 100% rename from src/openklant/components/contactmomenten/resources.md rename to src/openklant/components/legacy/contactmomenten/resources.md diff --git a/src/openklant/components/contactmomenten/swagger2.0.json b/src/openklant/components/legacy/contactmomenten/swagger2.0.json similarity index 100% rename from src/openklant/components/contactmomenten/swagger2.0.json rename to src/openklant/components/legacy/contactmomenten/swagger2.0.json diff --git a/src/openklant/components/klanten/api/__init__.py b/src/openklant/components/legacy/contactmomenten/tests/__init__.py similarity index 100% rename from src/openklant/components/klanten/api/__init__.py rename to src/openklant/components/legacy/contactmomenten/tests/__init__.py diff --git a/src/openklant/components/contactmomenten/tests/test_audittrails.py b/src/openklant/components/legacy/contactmomenten/tests/test_audittrails.py similarity index 95% rename from src/openklant/components/contactmomenten/tests/test_audittrails.py rename to src/openklant/components/legacy/contactmomenten/tests/test_audittrails.py index 73fbf64d..e3907ecc 100644 --- a/src/openklant/components/contactmomenten/tests/test_audittrails.py +++ b/src/openklant/components/legacy/contactmomenten/tests/test_audittrails.py @@ -5,8 +5,10 @@ from vng_api_common.audittrails.models import AuditTrail from vng_api_common.tests import JWTAuthMixin, reverse -from openklant.components.contactmomenten.models.constants import InitiatiefNemer -from openklant.components.contactmomenten.models.contactmomenten import ContactMoment +from openklant.components.legacy.contactmomenten.models.constants import InitiatiefNemer +from openklant.components.legacy.contactmomenten.models.contactmomenten import ( + ContactMoment, +) KLANT = "http://some.klanten.nl/api/v1/klanten/951e4660-3835-4643-8f9c-e523e364a30f" MEDEWERKER = ( diff --git a/src/openklant/components/contactmomenten/tests/test_notifications_kanaal.py b/src/openklant/components/legacy/contactmomenten/tests/test_notifications_kanaal.py similarity index 96% rename from src/openklant/components/contactmomenten/tests/test_notifications_kanaal.py rename to src/openklant/components/legacy/contactmomenten/tests/test_notifications_kanaal.py index 72638ce4..339548c2 100644 --- a/src/openklant/components/contactmomenten/tests/test_notifications_kanaal.py +++ b/src/openklant/components/legacy/contactmomenten/tests/test_notifications_kanaal.py @@ -9,7 +9,9 @@ from rest_framework.test import APITestCase from zgw_consumers.models import Service -from openklant.components.contactmomenten.models.contactmomenten import ContactMoment +from openklant.components.legacy.contactmomenten.models.contactmomenten import ( + ContactMoment, +) @override_settings(IS_HTTPS=True) diff --git a/src/openklant/components/contactmomenten/tests/test_notifications_send.py b/src/openklant/components/legacy/contactmomenten/tests/test_notifications_send.py similarity index 95% rename from src/openklant/components/contactmomenten/tests/test_notifications_send.py rename to src/openklant/components/legacy/contactmomenten/tests/test_notifications_send.py index b2a2e317..4a7545d0 100644 --- a/src/openklant/components/contactmomenten/tests/test_notifications_send.py +++ b/src/openklant/components/legacy/contactmomenten/tests/test_notifications_send.py @@ -7,8 +7,8 @@ from rest_framework import status from rest_framework.test import APITransactionTestCase -from openklant.components.contactmomenten.models.constants import InitiatiefNemer -from openklant.components.contactmomenten.models.tests.factories import ( +from openklant.components.legacy.contactmomenten.models.constants import InitiatiefNemer +from openklant.components.legacy.contactmomenten.models.tests.factories import ( ContactMomentFactory, ) from openklant.utils.tests.mixins import JWTAuthTransactionMixin diff --git a/src/openklant/components/contactmomenten/tests/utils.py b/src/openklant/components/legacy/contactmomenten/tests/utils.py similarity index 100% rename from src/openklant/components/contactmomenten/tests/utils.py rename to src/openklant/components/legacy/contactmomenten/tests/utils.py diff --git a/src/openklant/components/legacy/klanten/__init__.py b/src/openklant/components/legacy/klanten/__init__.py new file mode 100644 index 00000000..b2f3c2ab --- /dev/null +++ b/src/openklant/components/legacy/klanten/__init__.py @@ -0,0 +1 @@ +default_app_config = "openklant.components.legacy.klanten.apps.KlantenConfig" diff --git a/src/openklant/components/klanten/admin.py b/src/openklant/components/legacy/klanten/admin.py similarity index 100% rename from src/openklant/components/klanten/admin.py rename to src/openklant/components/legacy/klanten/admin.py diff --git a/src/openklant/components/klanten/api/tests/__init__.py b/src/openklant/components/legacy/klanten/api/__init__.py similarity index 100% rename from src/openklant/components/klanten/api/tests/__init__.py rename to src/openklant/components/legacy/klanten/api/__init__.py diff --git a/src/openklant/components/klanten/api/audits.py b/src/openklant/components/legacy/klanten/api/audits.py similarity index 100% rename from src/openklant/components/klanten/api/audits.py rename to src/openklant/components/legacy/klanten/api/audits.py diff --git a/src/openklant/components/klanten/api/auth.py b/src/openklant/components/legacy/klanten/api/auth.py similarity index 100% rename from src/openklant/components/klanten/api/auth.py rename to src/openklant/components/legacy/klanten/api/auth.py diff --git a/src/openklant/components/klanten/api/filters.py b/src/openklant/components/legacy/klanten/api/filters.py similarity index 100% rename from src/openklant/components/klanten/api/filters.py rename to src/openklant/components/legacy/klanten/api/filters.py diff --git a/src/openklant/components/klanten/api/kanalen.py b/src/openklant/components/legacy/klanten/api/kanalen.py similarity index 75% rename from src/openklant/components/klanten/api/kanalen.py rename to src/openklant/components/legacy/klanten/api/kanalen.py index c1118e7c..3220dce2 100644 --- a/src/openklant/components/klanten/api/kanalen.py +++ b/src/openklant/components/legacy/klanten/api/kanalen.py @@ -2,7 +2,7 @@ from notifications_api_common.kanalen import Kanaal -from openklant.components.klanten.models.klanten import Klant +from openklant.components.legacy.klanten.models.klanten import Klant KANAAL_KLANTEN = Kanaal( settings.KLANTEN_NOTIFICATIONS_KANAAL, diff --git a/src/openklant/components/klanten/api/schema.py b/src/openklant/components/legacy/klanten/api/schema.py similarity index 100% rename from src/openklant/components/klanten/api/schema.py rename to src/openklant/components/legacy/klanten/api/schema.py diff --git a/src/openklant/components/klanten/api/scopes.py b/src/openklant/components/legacy/klanten/api/scopes.py similarity index 100% rename from src/openklant/components/klanten/api/scopes.py rename to src/openklant/components/legacy/klanten/api/scopes.py diff --git a/src/openklant/components/klanten/api/serializers.py b/src/openklant/components/legacy/klanten/api/serializers.py similarity index 98% rename from src/openklant/components/klanten/api/serializers.py rename to src/openklant/components/legacy/klanten/api/serializers.py index 1738fa8b..a6431f4f 100644 --- a/src/openklant/components/klanten/api/serializers.py +++ b/src/openklant/components/legacy/klanten/api/serializers.py @@ -8,8 +8,11 @@ from vng_api_common.serializers import add_choice_values_help_text from vng_api_common.validators import IsImmutableValidator, URLValidator -from openklant.components.klanten.models.constants import GeslachtsAanduiding, KlantType -from openklant.components.klanten.models.klanten import ( +from openklant.components.legacy.klanten.models.constants import ( + GeslachtsAanduiding, + KlantType, +) +from openklant.components.legacy.klanten.models.klanten import ( Klant, KlantAdres, NatuurlijkPersoon, diff --git a/src/openklant/components/klanten/migrations/__init__.py b/src/openklant/components/legacy/klanten/api/tests/__init__.py similarity index 100% rename from src/openklant/components/klanten/migrations/__init__.py rename to src/openklant/components/legacy/klanten/api/tests/__init__.py diff --git a/src/openklant/components/klanten/api/tests/test_auth.py b/src/openklant/components/legacy/klanten/api/tests/test_auth.py similarity index 87% rename from src/openklant/components/klanten/api/tests/test_auth.py rename to src/openklant/components/legacy/klanten/api/tests/test_auth.py index 21e5e191..f1f2f3b4 100644 --- a/src/openklant/components/klanten/api/tests/test_auth.py +++ b/src/openklant/components/legacy/klanten/api/tests/test_auth.py @@ -6,10 +6,10 @@ from rest_framework.test import APITestCase from vng_api_common.tests import AuthCheckMixin, JWTAuthMixin, reverse -from openklant.components.klanten.api.scopes import SCOPE_KLANTEN_ALLES_LEZEN -from openklant.components.klanten.models.constants import KlantType -from openklant.components.klanten.models.klanten import Klant -from openklant.components.klanten.models.tests.factories import KlantFactory +from openklant.components.legacy.klanten.api.scopes import SCOPE_KLANTEN_ALLES_LEZEN +from openklant.components.legacy.klanten.models.constants import KlantType +from openklant.components.legacy.klanten.models.klanten import Klant +from openklant.components.legacy.klanten.models.tests.factories import KlantFactory SUBJECT = "http://example.com/subject/1" diff --git a/src/openklant/components/klanten/api/tests/test_klant.py b/src/openklant/components/legacy/klanten/api/tests/test_klant.py similarity index 99% rename from src/openklant/components/klanten/api/tests/test_klant.py rename to src/openklant/components/legacy/klanten/api/tests/test_klant.py index e1814d31..d2ebc648 100644 --- a/src/openklant/components/klanten/api/tests/test_klant.py +++ b/src/openklant/components/legacy/klanten/api/tests/test_klant.py @@ -3,9 +3,12 @@ from rest_framework.test import APITestCase from vng_api_common.tests import JWTAuthMixin, get_validation_errors, reverse -from openklant.components.klanten.models.constants import KlantType, SoortRechtsvorm -from openklant.components.klanten.models.klanten import Klant -from openklant.components.klanten.models.tests.factories import ( +from openklant.components.legacy.klanten.models.constants import ( + KlantType, + SoortRechtsvorm, +) +from openklant.components.legacy.klanten.models.klanten import Klant +from openklant.components.legacy.klanten.models.tests.factories import ( KlantAdresFactory, KlantFactory, NatuurlijkPersoonFactory, diff --git a/src/openklant/components/klanten/api/tests/test_urls.py b/src/openklant/components/legacy/klanten/api/tests/test_urls.py similarity index 100% rename from src/openklant/components/klanten/api/tests/test_urls.py rename to src/openklant/components/legacy/klanten/api/tests/test_urls.py diff --git a/src/openklant/components/klanten/api/tests/views.py b/src/openklant/components/legacy/klanten/api/tests/views.py similarity index 100% rename from src/openklant/components/klanten/api/tests/views.py rename to src/openklant/components/legacy/klanten/api/tests/views.py diff --git a/src/openklant/components/klanten/api/urls.py b/src/openklant/components/legacy/klanten/api/urls.py similarity index 100% rename from src/openklant/components/klanten/api/urls.py rename to src/openklant/components/legacy/klanten/api/urls.py diff --git a/src/openklant/components/klanten/api/utils.py b/src/openklant/components/legacy/klanten/api/utils.py similarity index 100% rename from src/openklant/components/klanten/api/utils.py rename to src/openklant/components/legacy/klanten/api/utils.py diff --git a/src/openklant/components/klanten/api/viewsets.py b/src/openklant/components/legacy/klanten/api/viewsets.py similarity index 97% rename from src/openklant/components/klanten/api/viewsets.py rename to src/openklant/components/legacy/klanten/api/viewsets.py index 51d1bccb..3adf7d69 100644 --- a/src/openklant/components/klanten/api/viewsets.py +++ b/src/openklant/components/legacy/klanten/api/viewsets.py @@ -9,7 +9,7 @@ ) from vng_api_common.permissions import AuthScopesRequired -from openklant.components.klanten.models.klanten import Klant +from openklant.components.legacy.klanten.models.klanten import Klant from .audits import AUDIT_KLANTEN from .filters import KlantFilter diff --git a/src/openklant/components/klanten/apps.py b/src/openklant/components/legacy/klanten/apps.py similarity index 58% rename from src/openklant/components/klanten/apps.py rename to src/openklant/components/legacy/klanten/apps.py index 85df301c..4b755620 100644 --- a/src/openklant/components/klanten/apps.py +++ b/src/openklant/components/legacy/klanten/apps.py @@ -2,4 +2,4 @@ class KlantenConfig(AppConfig): - name = "openklant.components.klanten" + name = "openklant.components.legacy.klanten" diff --git a/src/openklant/components/klanten/migrations/0001_initial.py b/src/openklant/components/legacy/klanten/migrations/0001_initial.py similarity index 100% rename from src/openklant/components/klanten/migrations/0001_initial.py rename to src/openklant/components/legacy/klanten/migrations/0001_initial.py diff --git a/src/openklant/components/klanten/migrations/0002_klant_aanmaakkanaal.py b/src/openklant/components/legacy/klanten/migrations/0002_klant_aanmaakkanaal.py similarity index 100% rename from src/openklant/components/klanten/migrations/0002_klant_aanmaakkanaal.py rename to src/openklant/components/legacy/klanten/migrations/0002_klant_aanmaakkanaal.py diff --git a/src/openklant/components/klanten/migrations/0003_auto_20211217_0958.py b/src/openklant/components/legacy/klanten/migrations/0003_auto_20211217_0958.py similarity index 100% rename from src/openklant/components/klanten/migrations/0003_auto_20211217_0958.py rename to src/openklant/components/legacy/klanten/migrations/0003_auto_20211217_0958.py diff --git a/src/openklant/components/klanten/migrations/0004_klant_geverifieerd.py b/src/openklant/components/legacy/klanten/migrations/0004_klant_geverifieerd.py similarity index 100% rename from src/openklant/components/klanten/migrations/0004_klant_geverifieerd.py rename to src/openklant/components/legacy/klanten/migrations/0004_klant_geverifieerd.py diff --git a/src/openklant/components/klanten/migrations/0005_auto_20230905_1215.py b/src/openklant/components/legacy/klanten/migrations/0005_auto_20230905_1215.py similarity index 100% rename from src/openklant/components/klanten/migrations/0005_auto_20230905_1215.py rename to src/openklant/components/legacy/klanten/migrations/0005_auto_20230905_1215.py diff --git a/src/openklant/components/klanten/models/__init__.py b/src/openklant/components/legacy/klanten/migrations/__init__.py similarity index 100% rename from src/openklant/components/klanten/models/__init__.py rename to src/openklant/components/legacy/klanten/migrations/__init__.py diff --git a/src/openklant/components/klanten/models/migrations/__init__.py b/src/openklant/components/legacy/klanten/models/__init__.py similarity index 100% rename from src/openklant/components/klanten/models/migrations/__init__.py rename to src/openklant/components/legacy/klanten/models/__init__.py diff --git a/src/openklant/components/klanten/models/constants.py b/src/openklant/components/legacy/klanten/models/constants.py similarity index 100% rename from src/openklant/components/klanten/models/constants.py rename to src/openklant/components/legacy/klanten/models/constants.py diff --git a/src/openklant/components/klanten/models/klanten.py b/src/openklant/components/legacy/klanten/models/klanten.py similarity index 100% rename from src/openklant/components/klanten/models/klanten.py rename to src/openklant/components/legacy/klanten/models/klanten.py diff --git a/src/openklant/components/klanten/models/tests/__init__.py b/src/openklant/components/legacy/klanten/models/migrations/__init__.py similarity index 100% rename from src/openklant/components/klanten/models/tests/__init__.py rename to src/openklant/components/legacy/klanten/models/migrations/__init__.py diff --git a/src/openklant/components/klanten/tests/__init__.py b/src/openklant/components/legacy/klanten/models/tests/__init__.py similarity index 100% rename from src/openklant/components/klanten/tests/__init__.py rename to src/openklant/components/legacy/klanten/models/tests/__init__.py diff --git a/src/openklant/components/klanten/models/tests/factories.py b/src/openklant/components/legacy/klanten/models/tests/factories.py similarity index 100% rename from src/openklant/components/klanten/models/tests/factories.py rename to src/openklant/components/legacy/klanten/models/tests/factories.py diff --git a/src/openklant/components/klanten/models/tests/test_audittrail_unique_representation.py b/src/openklant/components/legacy/klanten/models/tests/test_audittrail_unique_representation.py similarity index 100% rename from src/openklant/components/klanten/models/tests/test_audittrail_unique_representation.py rename to src/openklant/components/legacy/klanten/models/tests/test_audittrail_unique_representation.py diff --git a/src/openklant/components/klanten/openapi.yaml b/src/openklant/components/legacy/klanten/openapi.yaml similarity index 100% rename from src/openklant/components/klanten/openapi.yaml rename to src/openklant/components/legacy/klanten/openapi.yaml diff --git a/src/openklant/components/klanten/resources.md b/src/openklant/components/legacy/klanten/resources.md similarity index 100% rename from src/openklant/components/klanten/resources.md rename to src/openklant/components/legacy/klanten/resources.md diff --git a/src/openklant/components/klanten/swagger2.0.json b/src/openklant/components/legacy/klanten/swagger2.0.json similarity index 100% rename from src/openklant/components/klanten/swagger2.0.json rename to src/openklant/components/legacy/klanten/swagger2.0.json diff --git a/src/openklant/components/legacy/klanten/tests/__init__.py b/src/openklant/components/legacy/klanten/tests/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/src/openklant/components/klanten/tests/test_audittrails.py b/src/openklant/components/legacy/klanten/tests/test_audittrails.py similarity index 100% rename from src/openklant/components/klanten/tests/test_audittrails.py rename to src/openklant/components/legacy/klanten/tests/test_audittrails.py diff --git a/src/openklant/components/klanten/tests/test_notifications_kanaal.py b/src/openklant/components/legacy/klanten/tests/test_notifications_kanaal.py similarity index 100% rename from src/openklant/components/klanten/tests/test_notifications_kanaal.py rename to src/openklant/components/legacy/klanten/tests/test_notifications_kanaal.py diff --git a/src/openklant/components/klanten/tests/test_notifications_send.py b/src/openklant/components/legacy/klanten/tests/test_notifications_send.py similarity index 100% rename from src/openklant/components/klanten/tests/test_notifications_send.py rename to src/openklant/components/legacy/klanten/tests/test_notifications_send.py diff --git a/src/openklant/components/klanten/tests/utils.py b/src/openklant/components/legacy/klanten/tests/utils.py similarity index 100% rename from src/openklant/components/klanten/tests/utils.py rename to src/openklant/components/legacy/klanten/tests/utils.py diff --git a/src/openklant/conf/api.py b/src/openklant/conf/api.py index dc41aa00..0b8a97c5 100644 --- a/src/openklant/conf/api.py +++ b/src/openklant/conf/api.py @@ -11,14 +11,13 @@ REST_FRAMEWORK[ "DEFAULT_PAGINATION_CLASS" ] = "rest_framework.pagination.PageNumberPagination" - SECURITY_DEFINITION_NAME = "JWT-Claims" SWAGGER_SETTINGS = BASE_SWAGGER_SETTINGS.copy() SWAGGER_SETTINGS.update( { - "DEFAULT_INFO": "openklant.components.klanten.api.schema.info", + "DEFAULT_INFO": "openklant.components.legacy.klanten.api.schema.info", "SECURITY_DEFINITIONS": { SECURITY_DEFINITION_NAME: { # OAS 3.0 diff --git a/src/openklant/conf/base.py b/src/openklant/conf/base.py index ab846f2e..1434d957 100644 --- a/src/openklant/conf/base.py +++ b/src/openklant/conf/base.py @@ -135,9 +135,9 @@ "openklant", "openklant.accounts", "openklant.utils", - "openklant.components.klanten", - "openklant.components.contactmomenten", "openklant.components.klantinteracties", + "openklant.components.legacy.klanten", + "openklant.components.legacy.contactmomenten", ] MIDDLEWARE = [ @@ -363,10 +363,22 @@ # urls for OAS3 specifications SPEC_URL = { "klanten": os.path.join( - BASE_DIR, "src", "openklant", "components", "klanten", "openapi.yaml" + BASE_DIR, + "src", + "openklant", + "components", + "legacy", + "klanten", + "openapi.yaml", ), "contactmomenten": os.path.join( - BASE_DIR, "src", "openklant", "components", "contactmomenten", "openapi.yaml" + BASE_DIR, + "src", + "openklant", + "components", + "legacy", + "contactmomenten", + "openapi.yaml", ), } diff --git a/src/openklant/fixtures/default_admin_index.json b/src/openklant/fixtures/default_admin_index.json index e081866d..dc6e661e 100644 --- a/src/openklant/fixtures/default_admin_index.json +++ b/src/openklant/fixtures/default_admin_index.json @@ -4,72 +4,6 @@ "pk": 1, "fields": { "order": 3, - "name": "Klanten", - "slug": "klanten", - "models": [ - [ - "klanten", - "klant" - ], - [ - "klanten", - "klantadres" - ], - [ - "klanten", - "natuurlijkpersoon" - ], - [ - "klanten", - "nietnatuurlijkpersoon" - ], - [ - "klanten", - "subverblijfbuitenland" - ], - [ - "klanten", - "verblijfsadres" - ], - [ - "klanten", - "vestiging" - ] - ] - } - }, - { - "model": "admin_index.appgroup", - "pk": 2, - "fields": { - "order": 4, - "name": "Contactmomenten", - "slug": "contactmomenten", - "models": [ - [ - "contactmomenten", - "contactmoment" - ], - [ - "contactmomenten", - "klantcontactmoment" - ], - [ - "contactmomenten", - "medewerker" - ], - [ - "contactmomenten", - "objectcontactmoment" - ] - ] - } - }, - { - "model": "admin_index.appgroup", - "pk": 3, - "fields": { - "order": 5, "name": "Configuratie", "slug": "configuratie", "models": [ @@ -98,9 +32,9 @@ }, { "model": "admin_index.appgroup", - "pk": 4, + "pk": 2, "fields": { - "order": 6, + "order": 4, "name": "Notificaties", "slug": "notificaties", "models": [ @@ -117,7 +51,7 @@ }, { "model": "admin_index.appgroup", - "pk": 5, + "pk": 3, "fields": { "order": 1, "name": "Accounts", @@ -140,7 +74,7 @@ }, { "model": "admin_index.appgroup", - "pk": 6, + "pk": 4, "fields": { "order": 2, "name": "API autorisaties", @@ -167,9 +101,9 @@ }, { "model": "admin_index.appgroup", - "pk": 7, + "pk": 5, "fields": { - "order": 7, + "order": 5, "name": "Logging", "slug": "logging", "models": [ @@ -187,5 +121,61 @@ ] ] } + }, + { + "model": "admin_index.appgroup", + "pk": 6, + "fields": { + "order": 6, + "name": "Legacy", + "slug": "legacy", + "models": [ + [ + "klanten", + "klant" + ], + [ + "klanten", + "klantadres" + ], + [ + "klanten", + "natuurlijkpersoon" + ], + [ + "klanten", + "nietnatuurlijkpersoon" + ], + [ + "klanten", + "subverblijfbuitenland" + ], + [ + "klanten", + "verblijfsadres" + ], + [ + "klanten", + "vestiging" + ], + + [ + "contactmomenten", + "contactmoment" + ], + [ + "contactmomenten", + "klantcontactmoment" + ], + [ + "contactmomenten", + "medewerker" + ], + [ + "contactmomenten", + "objectcontactmoment" + ] + ] + } } ] diff --git a/src/openklant/urls.py b/src/openklant/urls.py index 898879b4..0db219da 100644 --- a/src/openklant/urls.py +++ b/src/openklant/urls.py @@ -45,9 +45,10 @@ auth_views.PasswordResetCompleteView.as_view(), name="password_reset_complete", ), - path("klanten/api/", include("openklant.components.klanten.api.urls")), + path("klanten/api/", include("openklant.components.legacy.klanten.api.urls")), path( - "contactmomenten/api/", include("openklant.components.contactmomenten.api.urls") + "contactmomenten/api/", + include("openklant.components.legacy.contactmomenten.api.urls"), ), # Simply show the master template. path("", TemplateView.as_view(template_name="main.html")), diff --git a/src/openklant/utils/tests/test_version.py b/src/openklant/utils/tests/test_version.py index d2b21f84..501d9234 100644 --- a/src/openklant/utils/tests/test_version.py +++ b/src/openklant/utils/tests/test_version.py @@ -40,7 +40,7 @@ def test_tagged_commit(self): self.assertEqual(get_current_version(), "v1.2.4") def test_multiple_tags(self): - self.mocked_subprocess.return_value = "v5.1.1\nv3.4.1\nv0.2.2\n" + self.mocked_subprocess.return_value = "v5.1.1\nv3.4.1\nv1.2.2\n" self.assertEqual(get_current_version(), "v5.1.1")