(user_id)
return render_template('follow-course.html',
                           user=user,
                           courses=user.courses_following,
                           info=(user.info if user.is_student else None))
用户关注过的所有课程
用户关注过的所有课程
用户关注过的所有课程
def follow_course(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('follow-course.html',
                           user=user,
                           courses=user.courses_following,
                           info=(user.info if user.is_student else None))
def follow_course ( 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 ( 'follow-course.html' , user = user , courses = user . courses_following , info = ( user . info if user . is_student else None ) )