Gio Borje Gio Borje - 2 years ago 128
Python Question

Create dynamic URLs in Flask with url_for()

Half of my Flask routes requires a variable say,

. How do I create links to those locations?

takes one argument for the function to route to but I can't add arguments?

Answer Source

It takes keyword arguments for the variables:

url_for('add', variable=foo)
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download