* refactors AbstractCompensationActionViews (new, edit, remove) to inherit from BaseModalFormView * refactors KOM, OEK, EMA views for compensation actions * moves message template strings into message_templates.py
		
			
				
	
	
		
			27 lines
		
	
	
		
			872 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			872 B
		
	
	
	
		
			Python
		
	
	
	
	
	
"""
 | 
						|
Author: Michel Peltriaux
 | 
						|
Organization: Struktur- und Genehmigungsdirektion Nord, Rhineland-Palatinate, Germany
 | 
						|
Contact: ksp-servicestelle@sgdnord.rlp.de
 | 
						|
Created on: 19.08.22
 | 
						|
 | 
						|
"""
 | 
						|
from compensation.models import EcoAccount
 | 
						|
from konova.views.action import AbstractNewCompensationActionView, AbstractEditCompensationActionView, \
 | 
						|
    AbstractRemoveCompensationActionView
 | 
						|
 | 
						|
_ECO_ACCOUNT_DETAIL_URL_NAME = "compensation:acc:detail"
 | 
						|
 | 
						|
class NewEcoAccountActionView(AbstractNewCompensationActionView):
 | 
						|
    _MODEL_CLS = EcoAccount
 | 
						|
    _REDIRECT_URL = _ECO_ACCOUNT_DETAIL_URL_NAME
 | 
						|
 | 
						|
 | 
						|
class EditEcoAccountActionView(AbstractEditCompensationActionView):
 | 
						|
    _MODEL_CLS = EcoAccount
 | 
						|
    _REDIRECT_URL = _ECO_ACCOUNT_DETAIL_URL_NAME
 | 
						|
 | 
						|
 | 
						|
class RemoveEcoAccountActionView(AbstractRemoveCompensationActionView):
 | 
						|
    _MODEL_CLS = EcoAccount
 | 
						|
    _REDIRECT_URL = _ECO_ACCOUNT_DETAIL_URL_NAME
 |