Flask入门教程用户,请使用 cmder(一个基于 ConEmu 实现的终端模拟器) 来代 替系统自带的 cmd.exe,或是使用安装 Git for Windows 后(下一节)附带的 Git Bash。cmder 集成了 Git Bash,支持一些在 Linux 或 macOS 下才能使用的命令 (程序),比如 ls、cat、nano、ssh 等,这些命令我们在后面会用到。 使用 Git Git 是一个流行 注册完成后会有一个简单的教程,你可以跳过,也可以跟着了解一下基本用法。管 理面板主页如下所示: 第 11 章:部署上线 113 导航栏包含几个常用的链接,可以打开其他面板: Consoles(控制台):可以打开 Bash、Python Shell、MySQL 等常用的控制 台 Files(文件):创建、删除、编辑、上传文件,你可以在这里直接修改代码 Web:管理 Web 程序 Tasks(任务):创建计划任务 拉取我们的程序 在本地将代码存储为压缩文件,然后在 Files 标签页上传压缩包 因为我们的代码已经推送到 GitHub 上,这里将采用第一种方式。首先通过管理面 板主页的“Bash”按钮或是 Consoles 面板下的“Bash”链接创建一个命令行会话: 第 11 章:部署上线 118 在命令行下输入下面的命令: $ pip3 install --user pipenv # 安装 Pipenv0 码力 | 127 页 | 7.62 MB | 1 年前3
Flask Documentation (1.1.x)to use it. The FLASK_APP environment variable is used to specify how to load the application. Unix Bash (Linux, Mac, etc.): $ export FLASK_APP=hello $ flask run Windows CMD: > set FLASK_APP=hello > flask the end of the virtualenv’s activate script. Activating the virtualenv will set the variables. Unix Bash, venv/bin/activate: $ export FLASK_APP=hello Windows CMD, venv\Scripts\activate.bat: > set FLASK_APP=hello by taking the file name from sys.argv[0]. complete_var – the environment variable that controls the bash completion support. The default is "__COMPLETE" with prog_name in uppercase. standalone_mode 0 码力 | 428 页 | 895.98 KB | 1 年前3
Flask Documentation (1.1.x)to use it. The FLASK_APP environment variable is used to specify how to load the application. Unix Bash (Linux, Mac, etc.): $ export FLASK_APP=hello $ flask run Windows CMD: > set FLASK_APP=hello > flask the end of the virtualenv’s activate script. Activating the virtualenv will set the variables. Unix Bash, venv/bin/activate: $ export FLASK_APP=hello Windows CMD, venv\Scripts\activate.bat: > set FLASK_APP=hello taking the file name from sys.argv[0]. • complete_var – the environment variable that controls the bash completion support. The default is "__COMPLETE" with prog_name in uppercase. • standalone_mode 0 码力 | 291 页 | 1.25 MB | 1 年前3
共 3 条
- 1













