Esempio n. 1
0
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")
Esempio n. 2
0
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")
Esempio n. 3
0
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")
Esempio n. 4
0
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")