Hi i am try to solve reset password through dynamically .. what i doing some one register my form it will store in my database all fields value storing, But i have give one more connection just like reset password through by mail if some one submit email it will go to email id and he will link their for reset password in that page i am password and conform password, this form it should go to the same register database in that particular field is that password, conform password only change not other value .. but in my code what happening updating password but remains column values showing null
View.py
def reset_password(request,id):
if request.method == 'POST' and Register.objects.all():
if Register.objects.get(id=id):
print('re')
password = request.POST['password']
password1 = request.POST['password1']
# Validation
#reg = Register.objects.filter(password='65789')
#for obj in reg:
# obj.password1 = '65789'
# obj.save()
arr = Register(id=id,password=password,password1=password1)
#user = Register(id=id,arr)
arr.save()
return HttpResponse('New password succesfully stored ')
return render(request,'reset_password.html')
##Mysql Database ..in that 24 id please check it you will get idea, i dnot want reset django frame work that why i am trying this way please any one help me
enter image description here
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…