taskapp/views/user.py
changeset 97 3699550991c6
parent 86 fcbdf372857c
child 100 2275886511df
equal deleted inserted replaced
93:1a1e712e60fd 97:3699550991c6
    36         
    36         
    37     else:
    37     else:
    38         user_profile = user.get_profile()
    38         user_profile = user.get_profile()
    39         is_mentor = True if user.task_mentors.all() else False
    39         is_mentor = True if user.task_mentors.all() else False
    40         can_create_task = False if user_profile.rights == u"CT" else True
    40         can_create_task = False if user_profile.rights == u"CT" else True
       
    41         notifications = user.notification_to.filter(deleted=False,is_read=False)
       
    42         requests = user.request_sent_to.filter(is_replied=False)
    41         
    43         
    42         context = {'user':user,
    44         context = {'user':user,
    43                    'is_guest':is_guest,
    45                    'is_guest':is_guest,
    44                    'is_mentor':is_mentor,
    46                    'is_mentor':is_mentor,
    45                    'task_list':task_list,
    47                    'task_list':task_list,
    46                    'can_create_task':can_create_task,
    48                    'can_create_task':can_create_task,
       
    49                    'notifications':notifications,
       
    50                    'requests':requests,
    47                    }
    51                    }
    48                    
    52                    
    49         return render_to_response('index.html', context)
    53         return render_to_response('index.html', context)
    50 
    54 
    51 @login_required
    55 @login_required