|
|
@@ -237,15 +237,10 @@ def RichiestaAggiornamentoPassword(request):
|
|
|
except Utente.DoesNotExist as dne:
|
|
|
print('informazione non trovata tra i codici fiscali utente')
|
|
|
try:
|
|
|
- a = Utente.objects.get(mail=informazione.lower())
|
|
|
- d = 'u'
|
|
|
- except Utente.DoesNotExist as dne:
|
|
|
- print('informazione non trovata tra le email')
|
|
|
- try:
|
|
|
- a = Amministratore.objects.get(login=informazione.lower())
|
|
|
- d = 'a'
|
|
|
- except Amministratore.DoesNotExist as dne:
|
|
|
- print('informazione non trovata tra i login amministratotore')
|
|
|
+ a = Amministratore.objects.get(login=informazione.lower())
|
|
|
+ d = 'a'
|
|
|
+ except Amministratore.DoesNotExist as dne:
|
|
|
+ print('informazione non trovata tra i login amministratotore')
|
|
|
|
|
|
if a:
|
|
|
print('informazione',a,d)
|
|
|
@@ -283,6 +278,7 @@ def RichiestaAggiornamentoPassword(request):
|
|
|
a.uuid = uuidres
|
|
|
a.lostpin = True
|
|
|
a.save()
|
|
|
+ print('pin salvato:',a.uuid)
|
|
|
|
|
|
return render(request,'updatePasswordEnd.html',{})
|
|
|
else:
|
|
|
@@ -290,7 +286,7 @@ def RichiestaAggiornamentoPassword(request):
|
|
|
else:
|
|
|
data['informazione'] = PasswordUpdate({'informazione':''})
|
|
|
|
|
|
- return render(request,'updatePassword.html',data)
|
|
|
+ return render(request,'requestNewPassword.html',data)
|
|
|
|
|
|
def ResetPassword(request,uuid=None):
|
|
|
print('uuid',uuid)
|