From 926b91ef97e138022e619a9fbbcddba7e800cc64 Mon Sep 17 00:00:00 2001 From: William Colmenares Date: Wed, 1 May 2019 17:48:24 -0400 Subject: [PATCH] fix password reset view --- dal/templates/resetpasswordnew.html | 2 +- dal/views.py | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/dal/templates/resetpasswordnew.html b/dal/templates/resetpasswordnew.html index adf1d0b..82ff152 100644 --- a/dal/templates/resetpasswordnew.html +++ b/dal/templates/resetpasswordnew.html @@ -12,7 +12,7 @@
-

{% trans "Please set new password for {{user}} " %}

+

{% trans "Please set new password for " %} {{user}}

{% include 'includes/_messages.html' %}
{% csrf_token %} diff --git a/dal/views.py b/dal/views.py index a2442cc..eb5e5de 100644 --- a/dal/views.py +++ b/dal/views.py @@ -331,7 +331,7 @@ class ResetRequest(View): # get the hidden value of user user = request.POST.get("user") # some checks over the supplied data - if user == "" or not user or user != self.request.user.username: + if user == "" or not user: return render(request, 'error.html', { 'service': service, 'error': 'Something went wrong. Did you use the supplied form?' } ) if password1 == "" or not password1 or password2 == "" or not password2: return render(request, 'error.html', { 'service': service, 'error': 'Please supply a password and confirm it.' } ) @@ -491,8 +491,6 @@ class PseudoUser(): class UserCreateAPI(APIView): def post(self, request): - print(request.data) - print(request.POST) username = request.POST.get('username') email = request.POST.get('email')