Compare commits

..

No commits in common. '25cd1944e1672b09aec6a88ad0214a0ef26dcbcd' and '76b970dac6ebac08f31544f439fc9891c94083ae' have entirely different histories.

  1. 1
      .gitignore
  2. 5
      demo/routes.py
  3. 5
      demo/templates/index.html
  4. 1
      demo/views/frontend.py
  5. 7
      entry.py
  6. 2
      requirements.txt

1
.gitignore vendored

@ -1,3 +1,2 @@
venv
demo/__pycache__
demo/views/__pycache__

@ -1,7 +1,6 @@
from .views import frontend
import aiohttp
def setup_routes(app):
app.router.add_routes(
[aiohttp.web.get('/', frontend.index), aiohttp.web.post('/button-clicked', frontend.button_clicked)])
app.router.add_routes([aiohttp.web.get('/', frontend.index), aiohttp.web.post('/button-clicked', frontend.button_clicked)])

@ -62,7 +62,6 @@
-moz-box-shadow: 0 5px 5px 0 rgba(0, 0, 0, 0.5);
box-shadow: 0 5px 5px 0 rgba(0, 0, 0, 0.5);
}
#myResult {
text-align: center;
color: white;
@ -76,9 +75,7 @@
<h1>Знакомство с aiohttp</h1>
<div id="root">
<div class="form">
<div class="form__button">
<button id='myButton'>Отправить</button>
</div>
<div class="form__button"><button id='myButton'>Отправить</button></div>
<p id="myResult"></p>
</div>
</div>

@ -3,6 +3,7 @@ import aiohttp
from aiohttp_jinja2 import template
@template('index.html')
async def index(request):
return {}

@ -1,7 +1,14 @@
import aiohttp
from demo import create_app
app = create_app()
if __name__ == '__main__':
aiohttp.web.run_app(app)

@ -1,2 +0,0 @@
aiohttp~=3.8.4
Jinja2~=3.1.2
Loading…
Cancel
Save