title: Forgotten password implementation in Django
body: <p>I am trying to implement a forgot password functionality in my django application. I have given a seperate forgottenPassword.html, where user can give his email id ; and if that email is registered(found in database) , corresponding password of that email is fetched and sent to his email id.This is what i am trying to achieve. Being a Django newbie i am stuck with the implementation. This is my <strong>forgottenPassword.html</strong> </p>
  
  <pre><code>&lt;form name="forgotPassword" method="POST" id="myFormid" action="http://10.1.0.90:8080/forgotPassword/"&gt;
  &lt;div style="float:center;width:100%;"&gt;
   Enter your E-mail ID&lt;/label&gt;&lt;br/&gt; &lt;input type="text" name="email" size="25" /&gt; 
   &lt;input type="submit" value="Submit" /&gt;
   &lt;/div&gt; 
  &lt;/form &gt;
  </code></pre>
  
  <p><strong>my method in views.py is</strong> </p>
  
  <pre><code>def forgotPassword(request):
      if request.POST:
          email=request.POST.get("email")
          print email
          user = UniversityDetails.objects.filter(email=email)
          print user
          if(not user):
              print "No user"
              return render_to_response("forgotPassword.html")
          else:   
  
              ???????????????
              return render_to_response("passwordRecovery.html")
      return render_to_response('forgotPassword.html')
  </code></pre>
  
  <p>Here, what i try to achieve is to pass the email id entered in forgottenPassword.html and save it in a variable 'email'. After that fetch all the objects with that email from database. and to filter password from it. I guess the part where i put ???? should be filled with a query to fetch the password corresponding to that email id. Can somebody help me to do this.</p>