Пример #1
0
def like(request):
    '''喜欢'''
    sid = int(request.POST.get('sid'))
    is_matched = logic.like_someone(request.user, sid)
    logic.add_swipe_score(sid, 'like')
    rds.srem('RCMD-%s' % request.user.id, sid)
    return render_json({'is_matched': is_matched})
Пример #2
0
def like(request):
    """
    喜欢
    :param request:
    :return:
    """
    sid = int(request.POST.get('sid'))
    user = request.user

    matched = logic.like_someone(user.id, sid)

    return render_json(data={'matched': matched})
Пример #3
0
def like(request):
    '''喜欢'''
    sid = int(request.POST.get('sid'))
    is_matched = logic.like_someone(request.user, sid)
    return render_json({'is_matched': is_matched})
Пример #4
0
def like(request):
    sid = int(request.POST.get("sid"))
    is_matched = logic.like_someone(request.user,sid)
    logic.add_swipe_score(sid,'like')
    rds.srem('RCMD-%s' % request.user.id,sid)# 删除redis集合中的某一个值
    return render_json({'is_matched':is_matched})