Refactoring
* renames model ResponsibilityData into Responsibility * renames model LegalData into Legal * moves form->object saving logic into model * refactors NewDocumentForm into special types for intervention, compensation, eco account and ema *
This commit is contained in:
@@ -5,7 +5,7 @@ from django.shortcuts import render
|
||||
|
||||
from intervention.forms.forms import NewInterventionForm, EditInterventionForm
|
||||
from intervention.forms.modalForms import ShareInterventionModalForm, NewRevocationModalForm, \
|
||||
CheckModalForm, NewDeductionModalForm
|
||||
CheckModalForm, NewDeductionModalForm, NewInterventionDocumentForm
|
||||
from intervention.models import Intervention, Revocation, InterventionDocument, RevocationDocument
|
||||
from intervention.tables import InterventionTable
|
||||
from konova.contexts import BaseContext
|
||||
@@ -123,7 +123,7 @@ def new_document_view(request: HttpRequest, id: str):
|
||||
|
||||
"""
|
||||
intervention = get_object_or_404(Intervention, id=id)
|
||||
form = NewDocumentForm(request.POST or None, request.FILES or None, instance=intervention, user=request.user)
|
||||
form = NewInterventionDocumentForm(request.POST or None, request.FILES or None, instance=intervention, user=request.user)
|
||||
return form.process_request(
|
||||
request,
|
||||
msg_success=_("Document added")
|
||||
|
||||
Reference in New Issue
Block a user