Skip to content Skip to sidebar Skip to footer

How Do I Get The Url Parameter In A Flask View

I am trying to get the url parameters from a flask view: www.domain.com/?f=x**2 How do I get x**2 from the url in a Flask view?

Solution 1:

You can retrieve query string variables using

request.args.get('myParam')

or

request.args['myParam']

Where myParam is the variable in the query string you're trying to receive.

Post a Comment for "How Do I Get The Url Parameter In A Flask View"