def activity(request, page): """ Returns the list of most recent activities by the users that the current user follows. """ me = request.session['_auth_user_id'] following = api.get_following(me) return HttpResponse(api.get_user_activity(me, following, page), mimetype="application/json")
def activity(request, user_id, page): """ Returns the list of most recent activities by a user. """ if not request.is_ajax(): raise Http404 return HttpResponse(api.get_user_activity([user_id], page), mimetype="application/json")
def activity(request, user_id, page): """ Returns the list of most recent activities by a user. """ if not request.is_ajax(): raise Http404 me = request.session['_auth_user_id'] return HttpResponse(api.get_user_activity(me, [user_id], page), mimetype="application/json")