(user_id)
return render_template('profile.html',
                           user=user,
                           info=(user.info if user.is_student else None),
                           current_user=current_user)
用户的个人主页,展示用户在站点的活跃情况
用户的个人主页,展示用户在站点的活跃情况
用户的个人主页 展示用户在站点的活跃情况
def view_profile(user_id):
    '''用户的个人主页,展示用户在站点的活跃情况'''
    user = User.query.get(user_id)
    if not user:
        message = _('Sorry, the user does not seem to exist!')
        return render_template('feedback.html', status=False, message=message)

    return render_template('profile.html',
                           user=user,
                           info=(user.info if user.is_student else None),
                           current_user=current_user)
def view_profile ( user_id ) : user = User . query . get ( user_id ) if not user : message = _ ( 'Sorry, the user does not seem to exist!' ) return render_template ( 'feedback.html' , status = False , message = message ) return render_template ( 'profile.html' , user = user , info = ( user . info if user . is_student else None ) , current_user = current_user )