summaryrefslogtreecommitdiff
path: root/taskapp/views/user.py
diff options
context:
space:
mode:
authornishanth2010-02-28 03:31:40 +0530
committernishanth2010-02-28 03:31:40 +0530
commit515dcfae7247c5d14efebe6f09c5ab9dc61e58ab (patch)
treed2048d96cbb6735313fa9ab4a23ff01f9b08bf7c /taskapp/views/user.py
parenteb93427d1f7b439258e6d2bd1c89afbd52d34ea2 (diff)
downloadpytask-515dcfae7247c5d14efebe6f09c5ab9dc61e58ab.tar.gz
pytask-515dcfae7247c5d14efebe6f09c5ab9dc61e58ab.tar.bz2
pytask-515dcfae7247c5d14efebe6f09c5ab9dc61e58ab.zip
now requests in sidebar shows the no.of unread notifications.
Diffstat (limited to 'taskapp/views/user.py')
-rw-r--r--taskapp/views/user.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/taskapp/views/user.py b/taskapp/views/user.py
index bc578a7..95448fa 100644
--- a/taskapp/views/user.py
+++ b/taskapp/views/user.py
@@ -14,6 +14,7 @@ from pytask.taskapp.forms.user import UserProfileEditForm
from pytask.taskapp.utilities.request import get_request
from pytask.taskapp.utilities.notification import get_notification
+from pytask.taskapp.utilities.user import get_user
about = {
"addmentors":"about/addmentors.html",
@@ -27,8 +28,8 @@ def show_msg(user, message, redirect_url=None, url_desc=None):
def homepage(request):
""" check for authentication and display accordingly. """
-
- user = request.user
+
+ user = get_user(request.user)
is_guest = False
is_mentor = False
can_create_task = False
@@ -43,7 +44,7 @@ def homepage(request):
else:
task_list = Task.objects.order_by('id').reverse()[:10]
- return render_to_response('index.html', {'is_guest':is_guest, 'task_list':task_list})
+ return render_to_response('index.html', {'user':user, 'is_guest':is_guest, 'task_list':task_list})
else:
user_profile = user.get_profile()