# HG changeset patch
# User nishanth
# Date 1267003049 -19800
# Node ID 49532a0f50712c6a33e9f9ae41781712e9f342ab
# Parent 624f9fd438e37a413fd34fc6fac1162c8f43d456
added user context variable in view_profile and edit_profile.
diff -r 624f9fd438e3 -r 49532a0f5071 taskapp/views/user.py
--- 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})
diff -r 624f9fd438e3 -r 49532a0f5071 templates/task/view.html
--- 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 @@
{{dep.title}}
{% endfor %}
{% if can_mod_tasks %}
- add more tasks
- remove an existing task
+ add more dependencies
+ remove an existing dependency
{% endif %}
{% else %}
{%if can_mod_tasks %}