|
|
@@ -2,8 +2,6 @@ from django.shortcuts import render
|
|
|
from django.core.mail import send_mail
|
|
|
from django.core.mail import SafeMIMEText
|
|
|
from configurazione.views import getConfigurazione
|
|
|
-#from domini.views import Aggiorna_Dominio_Da_Causale
|
|
|
-
|
|
|
from django.core.mail import EmailMultiAlternatives
|
|
|
from django.template.loader import get_template
|
|
|
from django.template import Context
|
|
|
@@ -13,6 +11,7 @@ from uuid import uuid4,UUID
|
|
|
import json
|
|
|
from mqtt import views as m
|
|
|
from mqtt.views import mqtt
|
|
|
+#from domini.views import Aggiorna_Dominio_Da_Causale
|
|
|
|
|
|
from .models import *
|
|
|
import re
|
|
|
@@ -330,7 +329,9 @@ def ControlloScadenzeContratto(request,demo=0,dominio=None,causale=None):
|
|
|
d.renew_code = uuid4()
|
|
|
|
|
|
if d.rinnovo_automatico:
|
|
|
- Aggiorna_Dominio_Da_Causale(d,getConfigurazione('Rinnovo:Automatico'))
|
|
|
+ c = Causale.objects.get(pk=getConfigurazione('Rinnovo:Automatico'))
|
|
|
+ print("Causale:",c.nome)
|
|
|
+ #Aggiorna_Dominio_Da_Causale(d,c,sm=ServizioMail())
|
|
|
|
|
|
if not demo:
|
|
|
d.save()
|
|
|
@@ -338,7 +339,6 @@ def ControlloScadenzeContratto(request,demo=0,dominio=None,causale=None):
|
|
|
print("Non salvo - modalita' demo")
|
|
|
listalog.append(("Non salvo - modalità demo"))
|
|
|
|
|
|
-
|
|
|
data={}
|
|
|
|
|
|
#if demo:
|
|
|
@@ -605,7 +605,6 @@ def ControlloScadenzaVicina(request,demo=0,dominio=None):
|
|
|
|
|
|
return render(request,"Controllo.Vicino.html",data)
|
|
|
|
|
|
-
|
|
|
|
|
|
def ConfermaScadenza(request,uuid=None):
|
|
|
# primo step, verifichiamo uuid
|
|
|
@@ -786,7 +785,7 @@ def ConfermaScadenza(request,uuid=None):
|
|
|
|
|
|
if causale.send_email_account:
|
|
|
ac = getConfigurazione("mail:accounting")
|
|
|
- re.split(' |,',ac)
|
|
|
+ ac = re.split(' |,',ac)
|
|
|
sm.set_rcptto(ac)
|
|
|
te = getConfigurazione("mail:accounting_template")
|
|
|
template = Template.objects.get(pk=te)
|