profile/views.py
changeset 275 c701e68f8d35
parent 274 5cd56898033c
child 276 c8c47fcb46f0
equal deleted inserted replaced
274:5cd56898033c 275:c701e68f8d35
    46 @login_required
    46 @login_required
    47 def browse_notifications(request):
    47 def browse_notifications(request):
    48     """ get the list of notifications that are not deleted and display in
    48     """ get the list of notifications that are not deleted and display in
    49     datetime order."""
    49     datetime order."""
    50 
    50 
    51     user = get_user(request.user)
    51     user = request.user
    52 
    52 
    53     active_notifications = user.notification_sent_to.filter(is_deleted=False).order_by('sent_date').reverse()
    53     active_notifications = user.notification_sent_to.filter(is_deleted=False).order_by('sent_date').reverse()
    54 
    54 
    55     context = {'user':user,
    55     context = {'user':user,
    56                'notifications':active_notifications,
    56                'notifications':active_notifications,