update REAMDE.rst with usage sample code

This commit is contained in:
Sick Yoon 2016-05-13 10:59:22 +09:00
parent ffa1c08189
commit 7091350ff3
1 changed files with 7 additions and 0 deletions

View File

@ -10,6 +10,13 @@ __ aiohttp_web_
Usage Usage
----- -----
.. code-block:: python
from aiohttp_security import authorize
@authorize(required=True, redirect_url='/login', permission='admin')
async def index(request, identity=None):
return web.Response(body=b'OK')
License License
------- -------