Migrations + Cleanup
* adds needed migrations
* refactors forms.py (700+ lines) in main konova app
* splits into forms/ and forms/modals and single class/topic-files for better maintainability and overview
* fixes bug in main konova app migration which could occur if a certain compensation migration did not run before
This commit is contained in:
@@ -5,8 +5,6 @@ Contact: michel.peltriaux@sgdnord.rlp.de
|
||||
Created on: 06.10.21
|
||||
|
||||
"""
|
||||
from dal import autocomplete
|
||||
from django import forms
|
||||
from user.models import User
|
||||
from django.db import transaction
|
||||
from django.urls import reverse, reverse_lazy
|
||||
@@ -16,7 +14,8 @@ from compensation.forms.forms import AbstractCompensationForm, CompensationRespo
|
||||
PikCompensationFormMixin
|
||||
from ema.models import Ema, EmaDocument
|
||||
from intervention.models import Responsibility, Handler
|
||||
from konova.forms import SimpleGeomForm, NewDocumentModalForm
|
||||
from konova.forms import SimpleGeomForm
|
||||
from konova.forms.modals import NewDocumentModalForm
|
||||
from user.models import UserActionLogEntry
|
||||
|
||||
|
||||
|
||||
19
ema/migrations/0005_ema_resubmission.py
Normal file
19
ema/migrations/0005_ema_resubmission.py
Normal file
@@ -0,0 +1,19 @@
|
||||
# Generated by Django 3.1.3 on 2022-08-15 06:03
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('konova', '0014_resubmission'),
|
||||
('ema', '0004_ema_is_pik'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='ema',
|
||||
name='resubmission',
|
||||
field=models.ManyToManyField(blank=True, null=True, related_name='_ema_resubmission_+', to='konova.Resubmission'),
|
||||
),
|
||||
]
|
||||
23
ema/migrations/0006_auto_20220815_0803.py
Normal file
23
ema/migrations/0006_auto_20220815_0803.py
Normal file
@@ -0,0 +1,23 @@
|
||||
# Generated by Django 3.1.3 on 2022-08-15 06:03
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('konova', '0014_resubmission'),
|
||||
('ema', '0005_ema_resubmission'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='ema',
|
||||
name='resubmission',
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='ema',
|
||||
name='resubmissions',
|
||||
field=models.ManyToManyField(blank=True, null=True, related_name='_ema_resubmissions_+', to='konova.Resubmission'),
|
||||
),
|
||||
]
|
||||
19
ema/migrations/0007_auto_20220815_1030.py
Normal file
19
ema/migrations/0007_auto_20220815_1030.py
Normal file
@@ -0,0 +1,19 @@
|
||||
# Generated by Django 3.1.3 on 2022-08-15 08:30
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('konova', '0014_resubmission'),
|
||||
('ema', '0006_auto_20220815_0803'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='ema',
|
||||
name='resubmissions',
|
||||
field=models.ManyToManyField(blank=True, related_name='_ema_resubmissions_+', to='konova.Resubmission'),
|
||||
),
|
||||
]
|
||||
@@ -16,8 +16,9 @@ from intervention.forms.modalForms import ShareModalForm
|
||||
from konova.contexts import BaseContext
|
||||
from konova.decorators import conservation_office_group_required, shared_access_required
|
||||
from ema.models import Ema, EmaDocument
|
||||
from konova.forms import RemoveModalForm, SimpleGeomForm, RecordModalForm, RemoveDeadlineModalForm, \
|
||||
from konova.forms.modals import RemoveModalForm, RecordModalForm, RemoveDeadlineModalForm, \
|
||||
EditDocumentModalForm, ResubmissionModalForm
|
||||
from konova.forms import SimpleGeomForm
|
||||
from konova.models import Deadline
|
||||
from konova.settings import DEFAULT_GROUP, ZB_GROUP, ETS_GROUP
|
||||
from konova.sub_settings.context_settings import TAB_TITLE_IDENTIFIER
|
||||
|
||||
Reference in New Issue
Block a user