计算机英语讲课笔记11(Play with Flask)

编程入门 行业动态 更新时间:2024-10-24 14:23:33

计算机<a href=https://www.elefans.com/category/jswz/34/1769953.html style=英语讲课笔记11(Play with Flask)"/>

计算机英语讲课笔记11(Play with Flask)

文章目录

  • 1. Flask's Documentation
  • 2. Installation of Flask
    • (1) Create an environment
    • (2) Activate the environment
    • (3) Install Flask
  • 3. Quick Start - 快速起步
    • (1) A Minimal Application
    • (2) Create and Visit a Template

1. Flask’s Documentation

  • .1.x/

2. Installation of Flask

  • .1.x/installation/
  • We recommend using the latest version of Python. The current version of Python is 3.10.5
  • Flask supports Python 3.7 and newer.
  • Check the version of Python on your computer.
  • It shows that Flask can be used on your computer.

(1) Create an environment

  • Look at the instruction in the document.
  • Let’s view the directory structure of the project - flaskdemo

(2) Activate the environment

  • Look at the instruction in the document.
  • We follow the instruction above.
  • Type the command and then press the Enter key

(3) Install Flask

  • Look at the instruction in the document.
  • We follow the instruction above.
  • Upgrade pip from 19.2.3 to 22.1.2

3. Quick Start - 快速起步

  • .1.x/quickstart/

(1) A Minimal Application

  • Use PyCharm to open the flask project - flaskdemo
  • Create a Python file named main.py
  • Write the code in the main.py
  • Run the program and look at the result.
  • Visit http://localhost:8888 in the browser.

(2) Create and Visit a Template

  • Create a template named welcome.html
  • Modify the main.py to create a new router function named welcome.
  • Run the program again and visit http://localhost:8888/welcome in the browser.

更多推荐

计算机英语讲课笔记11(Play with Flask)

本文发布于:2024-02-07 07:24:14,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1754555.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:英语   计算机   笔记   Flask   Play

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!