Update framework_support.rst
@@ -13,7 +13,8 @@ Flask support is available via the :mod:`webargs.flaskparser` module.
Decorator Usage
+++++++++++++++
-When using the :meth:`use_args <webargs.flaskparser.FlaskParser.use_args>` decorator, the arguments dictionary will be *before* any URL variable parameters.
+When using the :meth:`use_args <webargs.flaskparser.FlaskParser.use_args>` and :meth:`use_args <webargs.flaskparser.FlaskParser.use_args_async>`
+decorators, the arguments dictionary will be *before* any URL variable parameters.
.. code-block:: python
@@ -28,6 +29,13 @@ When using the :meth:`use_args <webargs.flaskparser.FlaskParser.use_args>` decor
uid=uid, per_page=args["per_page"]
)
+ @app.route("/user_async/<int:uid>")
+ @use_args_async({"per_page": fields.Int()}, location="query")
+ async def user_detail_async(args, uid):
+ return ("The user page for user {uid}, showing {per_page} posts.").format(
+ uid=uid, per_page=args["per_page"]
+ )
+
Error Handling
++++++++++++++
