From b14b01479b159def2d260e81c05bb40d837abd92 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Wed, 12 Jul 2017 17:29:26 +0200 Subject: [PATCH] Update the doc of web.Application (#2081) --- changes/2081.doc | 1 + docs/web_reference.rst | 29 ++++++++++++++++++++++------- 2 files changed, 23 insertions(+), 7 deletions(-) create mode 100644 changes/2081.doc diff --git a/changes/2081.doc b/changes/2081.doc new file mode 100644 index 00000000000..a8dd55860b7 --- /dev/null +++ b/changes/2081.doc @@ -0,0 +1 @@ +Update the doc of web.Application diff --git a/docs/web_reference.rst b/docs/web_reference.rst index 96752acfe3a..b4725eb3b37 100644 --- a/docs/web_reference.rst +++ b/docs/web_reference.rst @@ -1157,23 +1157,36 @@ properties for later access from a :ref:`handler` via the Although :class:`Application` is a :obj:`dict`-like object, it can't be duplicated like one using :meth:`Application.copy`. -.. class:: Application(*, router=None, logger=, \ - middlewares=(), debug=False, **kwargs) +.. class:: Application(*, logger=, router=None,middlewares=(), \ + handler_args=None, client_max_size=1024**2, \ + secure_proxy_ssl_header=None, loop=None, debug=...) The class inherits :class:`dict`. - :param router: :class:`aiohttp.abc.AbstractRouter` instance, the system - creates :class:`UrlDispatcher` by default if - *router* is ``None``. - :param logger: :class:`logging.Logger` instance for storing application logs. By default the value is ``logging.getLogger("aiohttp.web")`` + :param router: :class:`aiohttp.abc.AbstractRouter` instance, the system + creates :class:`UrlDispatcher` by default if + *router* is ``None``. + :param middlewares: :class:`list` of middleware factories, see :ref:`aiohttp-web-middlewares` for details. - :param debug: Switches debug mode. + :param handler_args: dict-like object that overrides keyword arguments of + :meth:`Application.make_handler` + + :param client_max_size: client's maximum size in a request. If a POST + request exceeds this value, it raises an + `HTTPRequestEntityTooLarge` exception. + + :param tuple secure_proxy_ssl_header: Default: ``None``. + + .. deprecated:: 2.1 + + See ``request.url.scheme`` for built-in resolution of the current + scheme using the standard and de-facto standard headers. :param loop: event loop @@ -1182,6 +1195,8 @@ duplicated like one using :meth:`Application.copy`. The parameter is deprecated. Loop is get set during freeze stage. + :param debug: Switches debug mode. + .. attribute:: router Read-only property that returns *router instance*.