diff options
Diffstat (limited to 'profile/views.py')
-rwxr-xr-x | profile/views.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/profile/views.py b/profile/views.py index 68e22d0..b6da227 100755 --- a/profile/views.py +++ b/profile/views.py @@ -42,3 +42,17 @@ def edit_profile(request): 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) |