def mark_all_as_read(request): """ Set all the notifications as read. @param request: the incoming request data. @return: returns to the referer page with all the notifications set as read. """ Notification.set_all_as_read(request.user) return redirect(request.META['HTTP_REFERER'])