equal
deleted
inserted
replaced
151 reply_to_request(req_obj, reply, user) |
151 reply_to_request(req_obj, reply, user) |
152 |
152 |
153 return show_msg("Your reply has been processed", browse_request_url, "view other requests") |
153 return show_msg("Your reply has been processed", browse_request_url, "view other requests") |
154 else: |
154 else: |
155 return show_msg("You are not authorised to do this", browse_request_url, "view other requests") |
155 return show_msg("You are not authorised to do this", browse_request_url, "view other requests") |
|
156 |
|
157 @login_required |
|
158 def browse_notifications(request): |
|
159 """ get the list of notifications that are not deleted and display in datetime order. |
|
160 """ |
|
161 |
|
162 user = request.user |
|
163 |
|
164 active_notifications = user.notification_to.filter(deleted=False).order_by('sent_date').reverse() |
|
165 for pos, notification in enumerate(reversed(active_notifications)): |
|
166 notification.pos = pos |
|
167 |
|
168 context = { |
|
169 'user':user, |
|
170 'notifications':active_notifications, |
|
171 } |
|
172 |
|
173 return render_to_response('user/browse_notifications.html', context) |