Branch: master
Find file History
imgbot and webknjaz [ImgBot] optimizes images (#51)
*Total -- 454.35kb -> 332.87kb (26.74%)

/demos/polls/aiohttpdemo_polls/static/images/background.png -- 6.80kb -> 3.75kb (44.78%)
/docs/_static/shorty.png -- 39.31kb -> 22.90kb (41.75%)
/docs/_static/moderator.png -- 28.72kb -> 18.46kb (35.74%)
/demos/moderator/docs/preview.png -- 28.72kb -> 18.46kb (35.74%)
/docs/_static/chat.png -- 28.14kb -> 18.47kb (34.38%)
/docs/_static/motortwit.png -- 139.19kb -> 94.49kb (32.12%)
/docs/_static/blog.png -- 17.15kb -> 12.75kb (25.69%)
/docs/_static/polls.png -- 63.35kb -> 50.85kb (19.74%)
/docs/_static/aiohttp-icon-128x128.png -- 59.68kb -> 53.71kb (10%)
/docs/_static/aiohttp-icon-96x96.png -- 37.71kb -> 33.98kb (9.88%)
/docs/_static/aiohttp-icon-32x32.png -- 5.58kb -> 5.07kb (9.22%)
Latest commit f5ebc77 Oct 7, 2018

README.rst

Polls

Example of polls project using aiohttp, aiopg and aiohttp_jinja2, similar to Django one.

Preparations

Details could be found in Preparations.

In short.

Run Postgres DB server:

$ docker run --rm -it -p 5432:5432 postgres:10

Create db and populate it with sample data:

$ python init_db.py

Run

Run application:

$ python -m aiohttpdemo_polls

Open browser:

http://localhost:8080/

https://raw.githubusercontent.com/aio-libs/aiohttp-demos/master/docs/_static/polls.png

Tests

$ pytest tests

or:

$ pip install tox
$ tox

Development

Please review general contribution info at README.

Also for illustration purposes it is useful to show project structure when it changes, like here. Here is how you can do that:

$ tree -I "__pycache__|aiohttpdemo_polls.egg-info" --dirsfirst

Requirements