flask five: url_for use Comments

 

from flask import url_for

 

url_for (view function name): According to the view of the function name specified url, as long as the same view function, url casually change will not affect

 

url_for Source:

 

Example view, execution flow

 

 

With parameters:

 

If undefined during mass participation, flask will be in the form of a query string parameter passing

 

Guess you like

Origin www.cnblogs.com/zhongyehai/p/11768741.html