Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Acquisti
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Cosimo Antonio Volpicelli
Acquisti
Commits
8928ec5b
Commit
8928ec5b
authored
Mar 4, 2021
by
Cosimo Antonio Volpicelli
Browse files
Options
Downloads
Patches
Plain Diff
send email test
parent
810b2b3c
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
Acquisti/settings.py
+7
-0
7 additions, 0 deletions
Acquisti/settings.py
utenti/templates/plain.html
+6
-4
6 additions, 4 deletions
utenti/templates/plain.html
utenti/urls.py
+3
-2
3 additions, 2 deletions
utenti/urls.py
utenti/views.py
+12
-8
12 additions, 8 deletions
utenti/views.py
with
28 additions
and
14 deletions
Acquisti/settings.py
+
7
−
0
View file @
8928ec5b
...
...
@@ -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
This diff is collapsed.
Click to expand it.
utenti/templates/plain.html
+
6
−
4
View file @
8928ec5b
...
...
@@ -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"
>
...
...
@@ -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>
...
...
@@ -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>
...
...
This diff is collapsed.
Click to expand it.
utenti/urls.py
+
3
−
2
View file @
8928ec5b
from
django.urls
import
path
from
.views
import
Index
,
Save
Acqui
st
o
,
AcquistiList
from
.views
import
Index
,
Save
Richie
st
a
,
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
'
),
...
...
This diff is collapsed.
Click to expand it.
utenti/views.py
+
12
−
8
View file @
8928ec5b
...
...
@@ -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
'
)
descrizione
articolo
=
request
.
POST
.
getlist
(
'
descrizione
articolo
'
)
prezzo
articolo
=
request
.
POST
.
getlist
(
'
prezzo
articolo
'
)
i
=
0
for
one
in
quantita
:
ss
=
{
'
quantita
'
:
one
,
'
codiceproduttore
'
:
codiceproduttore
[
i
],
'
descrizione
'
:
descrizione
[
i
],
'
prezzo
'
:
prezz
o
[
i
]}
ss
=
{
'
quantita
'
:
one
,
'
codiceproduttore
'
:
codiceproduttore
[
i
],
'
descrizione
articolo
'
:
descrizione
articolo
[
i
],
'
prezzo
articolo
'
:
prezzoarticol
o
[
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
'
)
prezzo
o
bfun
=
request
.
POST
.
getlist
(
'
prezzoobfun
'
)
capitolo
=
request
.
POST
.
getlist
(
'
capitolo
'
)
responsabilefondiobfun
=
request
.
POST
.
getlist
(
'
responsabilefondiobfun
'
)
recipients
=
[]
obfun
=
[]
for
one
in
obiettivofunzione
:
for
one
in
id
obiettivofunzione
:
recipients
.
append
(
responsabilefondiobfun
)
ss
=
{
'
capitolo
'
:
capitolo
[
i
],
'
idobiettivofunzione
'
:
idobiettivofunzione
[
i
],
'
obiettivofunzione
'
:
one
,
'
prezzoobfun
'
:
prezzobfun
[
i
]
,
'
responsabilefondiobfun
'
:
responsabilefondi
obfun
[
i
]}
ss
=
{
'
idobiettivofunzione
'
:
idobiettivofunzione
[
i
],
'
prezzoobfun
'
:
prezzo
obfun
[
i
]
}
obfun
.
append
(
ss
)
ar
.
append
(
ss
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment