def get_user_by_id(request): user_id = request.REQUEST.get('user_id') data = '' user = UserBase().get_user_by_id(user_id) if user: user = UserBase().format_user_full_info(user.id) data = { 'user_id': user.id, 'user_avatar': user.get_avatar_25(), 'user_avatar_300': user.get_avatar_300(), 'user_nick': user.nick, 'user_des': user.des, 'user_email': user.email, 'user_gender': user.gender, 'birthday': str(user.birthday), 'is_admin': user.is_admin, 'last_active': str(user.last_active), 'state': user.state, 'source': user.source_display, 'ip': user.ip, 'register_date': str(user.create_time) } return HttpResponse(json.dumps(data), mimetype='application/json')
def get_user_by_id(request): user_id = request.REQUEST.get('user_id') data = '' user = UserBase().get_user_by_id(user_id) if user: user = UserBase().format_user_full_info(user.id) data = { 'user_id': user.id, 'user_avatar': user.get_avatar_25(), 'user_avatar_300': user.get_avatar_300(), 'user_nick': user.nick, 'user_des': user.des, 'user_email': user.email, 'user_gender': user.gender, 'birthday': str(user.birthday), 'question_count': user.user_count['user_question_count'], 'answer_count': user.user_count['user_answer_count'], 'liked_count': user.user_count['user_liked_count'], 'follower_count': user.user_count['follower_count'], 'following_count': user.user_count['following_count'], 'is_recommend': user.is_recommend, 'is_admin': user.is_admin, 'is_customer_manager': user.is_customer_manager, 'last_active': str(user.last_active), 'state': user.state, 'ip': user.ip, 'register_date': str(user.create_time) } return HttpResponse(json.dumps(data), mimetype='application/json')
def get_user_by_id(request): user_id = request.REQUEST.get('user_id') data = '' user = UserBase().get_user_by_id(user_id) if user: user = UserBase().format_user_full_info(user.id) data = { 'user_id': user.id, 'user_avatar': user.get_avatar_25(), 'user_avatar_300': user.get_avatar_300(), 'user_nick': user.nick, 'user_des': user.des, 'user_email': user.email, 'user_gender': user.gender, 'birthday': str(user.birthday), 'is_admin': user.is_admin, 'last_active': str(user.last_active), 'state': user.state, 'source': user.source_display, 'ip': user.ip, 'register_date': str(user.create_time) } return HttpResponse(json.dumps(data), mimetype='application/json')
def get_user_by_id(request): user_id = request.REQUEST.get('user_id') data = '' user = UserBase().get_user_by_id(user_id) if user: user = UserBase().format_user_full_info(user.id) data = { 'user_id': user.id, 'user_avatar': user.get_avatar_25(), 'user_avatar_300': user.get_avatar_300(), 'user_nick': user.nick, 'user_des': user.des, 'user_email': user.email, 'user_gender': user.gender, 'birthday': str(user.birthday), 'question_count': user.user_count['user_question_count'], 'answer_count': user.user_count['user_answer_count'], 'liked_count': user.user_count['user_liked_count'], 'follower_count': user.user_count['follower_count'], 'following_count': user.user_count['following_count'], 'is_recommend': user.is_recommend, 'is_admin': user.is_admin, 'is_customer_manager': user.is_customer_manager, 'last_active': str(user.last_active), 'state': user.state, 'ip': user.ip, 'register_date': str(user.create_time) } return HttpResponse(json.dumps(data), mimetype='application/json')