From fd8ce4b2ec64b3cf0e878b9ca125d732834498ab Mon Sep 17 00:00:00 2001 From: mpeltriaux Date: Tue, 16 Nov 2021 09:02:44 +0100 Subject: [PATCH] Refactoring * create package from compensation/urls * renames modules inside of compensation/urls and compensation/views --- compensation/urls/__init__.py | 8 ++++++++ compensation/{comp_urls.py => urls/compensation.py} | 2 +- compensation/{account_urls.py => urls/eco_account.py} | 2 +- compensation/{payment_urls.py => urls/payment.py} | 2 +- compensation/{ => urls}/urls.py | 6 +++--- compensation/views/__init__.py | 6 +++--- .../views/{compensation_views.py => compensation.py} | 2 +- .../views/{eco_account_views.py => eco_account.py} | 0 compensation/views/{payment_views.py => payment.py} | 0 9 files changed, 18 insertions(+), 10 deletions(-) create mode 100644 compensation/urls/__init__.py rename compensation/{comp_urls.py => urls/compensation.py} (96%) rename compensation/{account_urls.py => urls/eco_account.py} (97%) rename compensation/{payment_urls.py => urls/payment.py} (89%) rename compensation/{ => urls}/urls.py (60%) rename compensation/views/{compensation_views.py => compensation.py} (99%) rename compensation/views/{eco_account_views.py => eco_account.py} (100%) rename compensation/views/{payment_views.py => payment.py} (100%) diff --git a/compensation/urls/__init__.py b/compensation/urls/__init__.py new file mode 100644 index 00000000..247de721 --- /dev/null +++ b/compensation/urls/__init__.py @@ -0,0 +1,8 @@ +""" +Author: Michel Peltriaux +Organization: Struktur- und Genehmigungsdirektion Nord, Rhineland-Palatinate, Germany +Contact: michel.peltriaux@sgdnord.rlp.de +Created on: 16.11.21 + +""" +from .urls import * diff --git a/compensation/comp_urls.py b/compensation/urls/compensation.py similarity index 96% rename from compensation/comp_urls.py rename to compensation/urls/compensation.py index 4e603e47..f169bb9e 100644 --- a/compensation/comp_urls.py +++ b/compensation/urls/compensation.py @@ -6,7 +6,7 @@ Created on: 24.08.21 """ from django.urls import path -from compensation.views import * +from compensation.views.compensation import * urlpatterns = [ # Main compensation diff --git a/compensation/account_urls.py b/compensation/urls/eco_account.py similarity index 97% rename from compensation/account_urls.py rename to compensation/urls/eco_account.py index e87fdf50..9bdecf2c 100644 --- a/compensation/account_urls.py +++ b/compensation/urls/eco_account.py @@ -6,7 +6,7 @@ Created on: 24.08.21 """ from django.urls import path -from compensation.views import * +from compensation.views.eco_account import * urlpatterns = [ path("", index_view, name="acc-index"), diff --git a/compensation/payment_urls.py b/compensation/urls/payment.py similarity index 89% rename from compensation/payment_urls.py rename to compensation/urls/payment.py index 5ec2b0a5..0bb80938 100644 --- a/compensation/payment_urls.py +++ b/compensation/urls/payment.py @@ -6,7 +6,7 @@ Created on: 24.08.21 """ from django.urls import path -from compensation.views import * +from compensation.views.payment import * urlpatterns = [ path('/new', new_payment_view, name='pay-new'), diff --git a/compensation/urls.py b/compensation/urls/urls.py similarity index 60% rename from compensation/urls.py rename to compensation/urls/urls.py index 368a037b..58765bcb 100644 --- a/compensation/urls.py +++ b/compensation/urls/urls.py @@ -9,7 +9,7 @@ from django.urls import path, include app_name = "compensation" urlpatterns = [ - path("", include("compensation.comp_urls")), - path("acc/", include("compensation.account_urls")), - path("pay/", include("compensation.payment_urls")), + path("", include("compensation.urls.compensation")), + path("acc/", include("compensation.urls.eco_account")), + path("pay/", include("compensation.urls.payment")), ] \ No newline at end of file diff --git a/compensation/views/__init__.py b/compensation/views/__init__.py index 9b7c1c52..db03b5a1 100644 --- a/compensation/views/__init__.py +++ b/compensation/views/__init__.py @@ -5,6 +5,6 @@ Contact: michel.peltriaux@sgdnord.rlp.de Created on: 16.11.21 """ -from .compensation_views import * -from .eco_account_views import * -from .payment_views import * \ No newline at end of file +from .compensation import * +from .eco_account import * +from .payment import * diff --git a/compensation/views/compensation_views.py b/compensation/views/compensation.py similarity index 99% rename from compensation/views/compensation_views.py rename to compensation/views/compensation.py index a2a57b67..5bef5040 100644 --- a/compensation/views/compensation_views.py +++ b/compensation/views/compensation.py @@ -12,7 +12,7 @@ from compensation.tables import CompensationTable from intervention.models import Intervention from konova.contexts import BaseContext from konova.decorators import * -from konova.forms import RemoveModalForm, SimpleGeomForm, NewDocumentForm +from konova.forms import RemoveModalForm, SimpleGeomForm from konova.utils.documents import get_document, remove_document from konova.utils.generators import generate_qr_code from konova.utils.message_templates import FORM_INVALID, IDENTIFIER_REPLACED, DATA_UNSHARED_EXPLANATION diff --git a/compensation/views/eco_account_views.py b/compensation/views/eco_account.py similarity index 100% rename from compensation/views/eco_account_views.py rename to compensation/views/eco_account.py diff --git a/compensation/views/payment_views.py b/compensation/views/payment.py similarity index 100% rename from compensation/views/payment_views.py rename to compensation/views/payment.py