Skip to content

Commit

Permalink
Update the doc of web.Application (#2081)
Browse files Browse the repository at this point in the history
  • Loading branch information
cecton authored and asvetlov committed Jul 12, 2017
1 parent 46e7a2f commit b14b014
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
1 change: 1 addition & 0 deletions changes/2081.doc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update the doc of web.Application
29 changes: 22 additions & 7 deletions docs/web_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1157,23 +1157,36 @@ properties for later access from a :ref:`handler<aiohttp-web-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=<default>, \
middlewares=(), debug=False, **kwargs)
.. class:: Application(*, logger=<default>, 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

Expand All @@ -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*.
Expand Down

0 comments on commit b14b014

Please sign in to comment.