Loading Acquisti/settings.py +7 −0 Original line number Diff line number Diff line Loading @@ -173,3 +173,10 @@ DIRETTORE = 'silvano.fineschi@inaf.it' RESPONSABILE_UFFICIO_CONTABILITA = 'tiziana.gamba@inaf.it' RESPONSABILE_UFFICIO_ACQUISTI = 'luigi.genesi@inaf.it' UFFICIO_ACQUISTI = ['luigi.genesi@inaf.it','laura.roma@inaf.it','giuseppina.antico@inaf.it'] EMAIL_HOST = 'smtp.gmail.com' EMAIL_HOST_USER = 'ca.volpicelli@gmail.com' EMAIL_HOST_PASSWORD = 'caV#290957#Vac' EMAIL_PORT = 587 EMAIL_USE_TLS =True EMAIL_USE_SSL = False utenti/templates/plain.html +6 −4 Original line number Diff line number Diff line Loading @@ -122,7 +122,8 @@ </span> </a> </li> </ul> <form> <form action="/utenti/save/richiesta" method="POST"> {% csrf_token %} <div class="tab-content"> <div id="step-1" class="tab-pane " role="tabpanel"> Loading Loading @@ -443,7 +444,7 @@ </span> </div> <div class="row"> Il bene/servizio in oggetto e' composto dai seguenti articoli: <h2>Il bene/servizio in oggetto e' composto dai seguenti articoli: </h2> </div> Loading @@ -460,13 +461,14 @@ <div class="articolidiv "> </div> <input id="acceptTerms" name="acceptTerms" type="checkbox" class="required"> <label for="acceptTerms">I agree with the Terms and Conditions.</label> <h2> e dovra' essere caricato sui seguenti capitoli degli obiettivi funzione : </h2> </div> <div id="step-6" class="tab-pane" role="tabpanel"> <h1>Finish</h1> <h2>Terms and Conditions</h2> <input id="acceptTerms" name="acceptTerms" type="checkbox" class="required"> <label for="acceptTerms">I agree with the Terms and Conditions.</label> <button type="submit"> Salva Richiesta </button> <button type="submit"> Invia Richiesta </button> </div> Loading utenti/urls.py +3 −2 Original line number Diff line number Diff line from django.urls import path from .views import Index,SaveAcquisto,AcquistiList from .views import Index,SaveRichiesta,AcquistiList urlpatterns = [ path(r'index', Index.as_view()), path(r'saveacquisto',SaveAcquisto.as_view()), #path(r'saveacquisto',SaveAcquisto.as_view()), path(r'save/richiesta',SaveRichiesta.as_view()), path('listaarticoli/<idrichiedente>', AcquistiList.as_view(), name='acquisti-list'), Loading utenti/views.py +12 −8 Original line number Diff line number Diff line Loading @@ -33,29 +33,33 @@ class Index(CreateView): context = {'ob_fun': ob_fun,'pollo': 'pollo'} return HttpResponse(template.render(context,request)) class SaveAcquisto(View): class SaveRichiesta(View): def post(self,request): ar = [] quantita = request.POST.getlist('quantita') codiceproduttore = request.POST.getlist('codiceproduttore') descrizione = request.POST.getlist('descrizione') prezzo = request.POST.getlist('prezzo') descrizionearticolo = request.POST.getlist('descrizionearticolo') prezzoarticolo = request.POST.getlist('prezzoarticolo') i=0 for one in quantita: ss={'quantita': one ,'codiceproduttore':codiceproduttore[i],'descrizione':descrizione[i],'prezzo':prezzo[i]} ss={'quantita': one ,'codiceproduttore':codiceproduttore[i],'descrizionearticolo':descrizionearticolo[i],'prezzoarticolo':prezzoarticolo[i]} ar.append(ss) i+=1 i=0 obiettivofunzione = request.POST.getlist('obiettivofunzione') #obiettivofunzione = request.POST.getlist('obiettivofunzione') idobiettivofunzione = request.POST.getlist('idobiettivofunzione') prezzobfun = request.POST.getlist('prezzoobfun') prezzoobfun = request.POST.getlist('prezzoobfun') capitolo = request.POST.getlist('capitolo') responsabilefondiobfun = request.POST.getlist('responsabilefondiobfun') recipients=[] obfun = [] for one in obiettivofunzione: for one in idobiettivofunzione: recipients.append(responsabilefondiobfun) ss={'capitolo': capitolo[i],'idobiettivofunzione':idobiettivofunzione[i],'obiettivofunzione':one,'prezzoobfun': prezzobfun[i] ,'responsabilefondiobfun':responsabilefondiobfun[i]} ss={'idobiettivofunzione':idobiettivofunzione[i],'prezzoobfun': prezzoobfun[i] } obfun.append(ss) ar.append(ss) Loading Loading
Acquisti/settings.py +7 −0 Original line number Diff line number Diff line Loading @@ -173,3 +173,10 @@ DIRETTORE = 'silvano.fineschi@inaf.it' RESPONSABILE_UFFICIO_CONTABILITA = 'tiziana.gamba@inaf.it' RESPONSABILE_UFFICIO_ACQUISTI = 'luigi.genesi@inaf.it' UFFICIO_ACQUISTI = ['luigi.genesi@inaf.it','laura.roma@inaf.it','giuseppina.antico@inaf.it'] EMAIL_HOST = 'smtp.gmail.com' EMAIL_HOST_USER = 'ca.volpicelli@gmail.com' EMAIL_HOST_PASSWORD = 'caV#290957#Vac' EMAIL_PORT = 587 EMAIL_USE_TLS =True EMAIL_USE_SSL = False
utenti/templates/plain.html +6 −4 Original line number Diff line number Diff line Loading @@ -122,7 +122,8 @@ </span> </a> </li> </ul> <form> <form action="/utenti/save/richiesta" method="POST"> {% csrf_token %} <div class="tab-content"> <div id="step-1" class="tab-pane " role="tabpanel"> Loading Loading @@ -443,7 +444,7 @@ </span> </div> <div class="row"> Il bene/servizio in oggetto e' composto dai seguenti articoli: <h2>Il bene/servizio in oggetto e' composto dai seguenti articoli: </h2> </div> Loading @@ -460,13 +461,14 @@ <div class="articolidiv "> </div> <input id="acceptTerms" name="acceptTerms" type="checkbox" class="required"> <label for="acceptTerms">I agree with the Terms and Conditions.</label> <h2> e dovra' essere caricato sui seguenti capitoli degli obiettivi funzione : </h2> </div> <div id="step-6" class="tab-pane" role="tabpanel"> <h1>Finish</h1> <h2>Terms and Conditions</h2> <input id="acceptTerms" name="acceptTerms" type="checkbox" class="required"> <label for="acceptTerms">I agree with the Terms and Conditions.</label> <button type="submit"> Salva Richiesta </button> <button type="submit"> Invia Richiesta </button> </div> Loading
utenti/urls.py +3 −2 Original line number Diff line number Diff line from django.urls import path from .views import Index,SaveAcquisto,AcquistiList from .views import Index,SaveRichiesta,AcquistiList urlpatterns = [ path(r'index', Index.as_view()), path(r'saveacquisto',SaveAcquisto.as_view()), #path(r'saveacquisto',SaveAcquisto.as_view()), path(r'save/richiesta',SaveRichiesta.as_view()), path('listaarticoli/<idrichiedente>', AcquistiList.as_view(), name='acquisti-list'), Loading
utenti/views.py +12 −8 Original line number Diff line number Diff line Loading @@ -33,29 +33,33 @@ class Index(CreateView): context = {'ob_fun': ob_fun,'pollo': 'pollo'} return HttpResponse(template.render(context,request)) class SaveAcquisto(View): class SaveRichiesta(View): def post(self,request): ar = [] quantita = request.POST.getlist('quantita') codiceproduttore = request.POST.getlist('codiceproduttore') descrizione = request.POST.getlist('descrizione') prezzo = request.POST.getlist('prezzo') descrizionearticolo = request.POST.getlist('descrizionearticolo') prezzoarticolo = request.POST.getlist('prezzoarticolo') i=0 for one in quantita: ss={'quantita': one ,'codiceproduttore':codiceproduttore[i],'descrizione':descrizione[i],'prezzo':prezzo[i]} ss={'quantita': one ,'codiceproduttore':codiceproduttore[i],'descrizionearticolo':descrizionearticolo[i],'prezzoarticolo':prezzoarticolo[i]} ar.append(ss) i+=1 i=0 obiettivofunzione = request.POST.getlist('obiettivofunzione') #obiettivofunzione = request.POST.getlist('obiettivofunzione') idobiettivofunzione = request.POST.getlist('idobiettivofunzione') prezzobfun = request.POST.getlist('prezzoobfun') prezzoobfun = request.POST.getlist('prezzoobfun') capitolo = request.POST.getlist('capitolo') responsabilefondiobfun = request.POST.getlist('responsabilefondiobfun') recipients=[] obfun = [] for one in obiettivofunzione: for one in idobiettivofunzione: recipients.append(responsabilefondiobfun) ss={'capitolo': capitolo[i],'idobiettivofunzione':idobiettivofunzione[i],'obiettivofunzione':one,'prezzoobfun': prezzobfun[i] ,'responsabilefondiobfun':responsabilefondiobfun[i]} ss={'idobiettivofunzione':idobiettivofunzione[i],'prezzoobfun': prezzoobfun[i] } obfun.append(ss) ar.append(ss) Loading