added forgot password in template.
authoranoop
Fri, 19 Feb 2010 21:46:24 +0530
changeset 45 ab8918e654ae
parent 44 2b09336352b5
child 46 7dd834f5f493
added forgot password in template.
taskapp/views/user.py
templates/base.html
templates/registration/login.html
templates/user/my_profile.html
--- a/taskapp/views/user.py	Thu Feb 18 19:39:54 2010 +0530
+++ b/taskapp/views/user.py	Fri Feb 19 21:46:24 2010 +0530
@@ -61,6 +61,7 @@
         raise Http404
     return render_to_response('user/my_profile.html', {'edit_profile':edit_profile,'profile':profile})
 
+@login_required
 def edit_my_profile(request):
     """ enables the user to edit his/her user profile """
     if str(request.user) == 'AnonymousUser':
--- a/templates/base.html	Thu Feb 18 19:39:54 2010 +0530
+++ b/templates/base.html	Fri Feb 19 21:46:24 2010 +0530
@@ -3,5 +3,11 @@
     <title>{% block title %}PyTasks{% endblock %}</title>
 </head>
 <body>
-<h2><a href="/">PyTasks</a></h2><br />{% block content %}This is the default content{% endblock %}</body>
+<h2><a href="/">PyTasks</a></h2>
+<a href="javascript:history.go(-1)">back</a> 
+{% if user.is_authenticated %}
+ | <a href="/accounts/logout">logout</a> 
+{% endif %}
+<br><br>
+{% block content %}This is the default content{% endblock %}</body>
 </html>
--- a/templates/registration/login.html	Thu Feb 18 19:39:54 2010 +0530
+++ b/templates/registration/login.html	Fri Feb 19 21:46:24 2010 +0530
@@ -4,4 +4,5 @@
 {{ form.as_p }}
 <input type="submit" value="Login" />
 </form>
+<a href="/accounts/password/reset">Forgot password?</a>
 {% endblock %}
--- a/templates/user/my_profile.html	Thu Feb 18 19:39:54 2010 +0530
+++ b/templates/user/my_profile.html	Fri Feb 19 21:46:24 2010 +0530
@@ -10,7 +10,7 @@
     <h2>{{ profile }}'s Profile</h2>
     <hr>
     {% if edit_profile %}
-        <a href="/user/edit/">edit profile</a>
+        <a href="/user/edit/">edit profile</a> | <a href="/accounts/password/change">change password</a>
         <hr>
     {% endif %}
     {% if profile.aboutme %}