Update readme

This commit is contained in:
Roman Mogylatov 2020-07-17 10:29:10 -04:00
parent 62ebe8d6b9
commit 1be15f4506

View File

@ -72,6 +72,7 @@ This place is called **the container**. You use the container to manage all the
from dependency_injector import containers, providers
from dependency_injector.ext import flask
from flask import Flask
from flask_bootstrap import Bootstrap
from github import Github
from . import views, services
@ -82,6 +83,8 @@ This place is called **the container**. You use the container to manage all the
app = flask.Application(Flask, __name__)
bootstrap = flask.Extension(Bootstrap)
config = providers.Configuration()
github_client = providers.Factory(
@ -118,6 +121,9 @@ Running such container looks like this:
app = container.app()
app.container = container
bootstrap = container.bootstrap()
bootstrap.init_app(app)
app.add_url_rule('/', view_func=container.index_view.as_view())
return app