diff -r ee00b42e802f -r 8318df7e2d52 profile/views.py --- a/profile/views.py Fri Jan 07 11:53:11 2011 +0530 +++ b/profile/views.py Fri Jan 07 12:12:06 2011 +0530 @@ -42,3 +42,17 @@ form = EditProfileForm(instance=profile) context.update({"form":form}) return render_to_response("profile/edit.html", context) + +@login_required +def browse_notifications(request): + """ get the list of notifications that are not deleted and display in + datetime order.""" + + user = get_user(request.user) + + active_notifications = user.notification_sent_to.filter(is_deleted=False).order_by('sent_date').reverse() + + context = {'user':user, + 'notifications':active_notifications, + } + return render_to_response('profile/browse_notifications.html', context)