项目安装(pip)

pip安装:

  • hello wolrd:
    (venv) D:\MySpace\FlaskDemo>pip install flask
  • web表单
    (venv) D:\MySpace\FlaskDemo>pip install Flask-WTF
  • 数据库
    (venv) D:\MySpace\FlaskDemo>pip install flask_sqlalchemy
  • 用户登录
    (venv) D:\MySpace\FlaskDemo>pip install Flask-Login
    (venv) D:\MySpace\FlaskDemo>pip install Flask-OpenID

导入模块操作:

  • web表单
    from flask_wtf import FlaskForm
    from wtforms import StringField, BooleanField
    from wtforms.validators import DataRequired

  • 数据库
    from flask_sqlalchemy import SQLAlchemy

  • 用户登录
    from flask_openid import OpenID
    from flask_login import LoginManager

你可能感兴趣的:(项目安装(pip))