[Flask] need help on request.view_args

David Lord davidism at gmail.com
Tue Jan 19 21:12:27 EST 2016


|view_args| is the list of arguments passed to the view, either captured 
from the url rule or set in the url defaults. 
http://flask.pocoo.org/docs/0.10/api/#flask.Request.view_args

|@app.route('/hello/<name>') def hello(name): return 'Hello, 
{}'.format(name) |

In this example, |view_args| will be |{'name': 'david'}| when you go to 
|/hello/david|.

​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/flask/attachments/20160119/06620ace/attachment.html>


More information about the Flask mailing list