From 904bcf06f83503e7f44abc4d52737ff0645431c2 Mon Sep 17 00:00:00 2001 From: Pedro Barbosa Date: Fri, 9 Feb 2024 19:51:04 +0000 Subject: [PATCH] fix: pagina de alteracao de senha com versao estavel --- project/app/templates/user_profile.html | 26 +++++++++++++++++-------- project/app/views.py | 13 ++++++++----- 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/project/app/templates/user_profile.html b/project/app/templates/user_profile.html index 34da0754..d9192858 100644 --- a/project/app/templates/user_profile.html +++ b/project/app/templates/user_profile.html @@ -58,9 +58,9 @@ diff --git a/project/app/views.py b/project/app/views.py index 61128c61..16824f86 100755 --- a/project/app/views.py +++ b/project/app/views.py @@ -45,12 +45,15 @@ class HomeView(TemplateView): @login_required(login_url="/login/") def user_profile(request): - cpf = Employee.objects.get(user=request.user).cpf - maskered_cpf = f"{cpf[0:3]}.{cpf[3:6]}.{cpf[6:9]}-{cpf[9:11]}" + if request.method == 'POST': + print("trocar senha") + else: + cpf = Employee.objects.get(user=request.user).cpf + maskered_cpf = f"{cpf[0:3]}.{cpf[3:6]}.{cpf[6:9]}-{cpf[9:11]}" - return render(request,'user_profile.html',{ - "cpf":maskered_cpf, - }) + return render(request,'user_profile.html',{ + "cpf":maskered_cpf, + }) def login(request): if request.method =="GET":