Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

静态路由和动态路由有什么区别 #115

Open
Sogrey opened this issue Feb 20, 2020 · 0 comments
Open

静态路由和动态路由有什么区别 #115

Sogrey opened this issue Feb 20, 2020 · 0 comments

Comments

@Sogrey
Copy link
Owner

Sogrey commented Feb 20, 2020

静态路由和动态路由

路由:Url Path
http://localhost/abc/test.html
静态路由:Path与路由函数一一对应
动态路由:多个Path与同一个路由函数对应
http://localhost/abc/test.html
http://localhost/xyz/test.html

不管访问哪一个Url,都会执行同一个服务端的路由函数

静态路由就是一个Url对应唯一的路由函数,而动态路由多个Url对应同一个路由函数。
动态路由通过<…>指定动态传递的参数。

如何使用Flask实现动态路由 #116

@Sogrey Sogrey added this to 编程应用 in Python QAs Feb 20, 2020
@Sogrey Sogrey moved this from 编程应用 to Python web in Python QAs Feb 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Python QAs
Python web
Development

No branches or pull requests

1 participant