How do I get the url parameter in a Flask view

后端 未结 1 588
别那么骄傲
别那么骄傲 2021-02-07 02:37

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 F

相关标签:
1条回答
  • 2021-02-07 03:22

    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.

    0 讨论(0)
提交回复
热议问题