added user context variable in view_profile and edit_profile.
--- a/taskapp/views/user.py Wed Feb 24 14:40:20 2010 +0530
+++ b/taskapp/views/user.py Wed Feb 24 14:47:29 2010 +0530
@@ -54,13 +54,13 @@
if uid == None:
edit_profile = True
profile = Profile.objects.get(user = request.user)
- return render_to_response('user/my_profile.html', {'edit_profile':edit_profile,'profile':profile})
+ return render_to_response('user/my_profile.html', {'edit_profile':edit_profile,'profile':profile, 'user':request.user})
edit_profile = True if request.user == User.objects.get(pk=uid) else False
try:
profile = Profile.objects.get(user = User.objects.get(pk=uid))
except Profile.DoesNotExist:
raise Http404
- return render_to_response('user/my_profile.html', {'edit_profile':edit_profile,'profile':profile})
+ return render_to_response('user/my_profile.html', {'edit_profile':edit_profile,'profile':profile, 'user':request.user})
@login_required
def edit_my_profile(request):
@@ -93,5 +93,5 @@
else:
profile = Profile.objects.get(user = request.user)
edit_profile_form = UserProfileEditForm(instance = profile)
- return render_to_response('user/edit_profile.html',{'edit_profile_form' : edit_profile_form})
+ return render_to_response('user/edit_profile.html',{'edit_profile_form' : edit_profile_form, 'user':request.user})
--- a/templates/task/view.html Wed Feb 24 14:40:20 2010 +0530
+++ b/templates/task/view.html Wed Feb 24 14:47:29 2010 +0530
@@ -23,8 +23,8 @@
<a href="/task/view/tid={{dep.id}}">{{dep.title}}</a><br />
{% endfor %}
{% if can_mod_tasks %}
- <a href="/task/addtask/tid={{task.id}}">add more tasks</a>
- <a href="/task/remtask/tid={{task.id}}">remove an existing task</a>
+ <a href="/task/addtask/tid={{task.id}}">add more dependencies</a>
+ <a href="/task/remtask/tid={{task.id}}">remove an existing dependency</a>
{% endif %}
{% else %}
{%if can_mod_tasks %}