Commit 926b91ef authored by William Colmenares's avatar William Colmenares

fix password reset view

parent 55ca8688
......@@ -12,7 +12,7 @@
<div class="auth-center">
<div class="auth-content">
<div class="auth-box">
<h1 class="section-heading allcaps">{% trans "Please set new password for {{user}} " %}</h1>
<h1 class="section-heading allcaps">{% trans "Please set new password for " %} {{user}} </h1>
{% include 'includes/_messages.html' %}
<form action="{% url 'reset' %}" method="post" class="form">
{% csrf_token %}
......
......@@ -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')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment