mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2025-01-30 19:24:31 +03:00
Rename views module to handlers in aiohttp example
This commit is contained in:
parent
a9970b63b9
commit
e37b5181e4
|
@ -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%
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
"""Views module."""
|
||||
"""Handlers module."""
|
||||
|
||||
from aiohttp import web
|
||||
from dependency_injector.wiring import Provide
|
Loading…
Reference in New Issue
Block a user