Rename views module to handlers in aiohttp example

This commit is contained in:
Roman Mogylatov 2020-09-23 15:58:36 -04:00
parent a9970b63b9
commit e37b5181e4
3 changed files with 5 additions and 5 deletions

View File

@ -110,8 +110,8 @@ The output should be something like:
giphynavigator/application.py 12 0 100%
giphynavigator/containers.py 6 0 100%
giphynavigator/giphy.py 14 9 36%
giphynavigator/handlers.py 9 0 100%
giphynavigator/services.py 9 1 89%
giphynavigator/tests.py 37 0 100%
giphynavigator/views.py 9 0 100%
---------------------------------------------------
TOTAL 92 15 84%

View File

@ -3,7 +3,7 @@
from aiohttp import web
from .containers import Container
from . import views
from . import handlers
def create_app():
@ -12,13 +12,13 @@ def create_app():
container.config.from_yaml('config.yml')
container.config.giphy.api_key.from_env('GIPHY_API_KEY')
container.wire(modules=[views])
container.wire(modules=[handlers])
app = web.Application()
app.container = container
app.add_routes([
web.get('/', views.index),
web.get('/', handlers.index),
])
return app

View File

@ -1,4 +1,4 @@
"""Views module."""
"""Handlers module."""
from aiohttp import web
from dependency_injector.wiring import Provide