Added registration migration
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from flask import Flask, Blueprint
|
||||
|
||||
from . import commands, login, target_exchange, target
|
||||
from . import commands, login, target_exchange, target, registration
|
||||
from .exceptions import ApiException
|
||||
from .extensions import db, migrate, jwt, apispec
|
||||
from .settings import ProdConfig, Config
|
||||
@@ -10,7 +10,7 @@ def create_app(config: Config = ProdConfig) -> Flask:
|
||||
"""An application factory, as explained here:
|
||||
http://flask.pocoo.org/docs/patterns/appfactories/.
|
||||
|
||||
:param config_object: The configuration object to use.
|
||||
:param config: The configuration object to use.
|
||||
"""
|
||||
app = Flask(__name__.split('.')[0])
|
||||
app.url_map.strict_slashes = False
|
||||
@@ -37,12 +37,10 @@ def register_blueprints(app: Flask):
|
||||
"""Register Flask blueprints."""
|
||||
api_blueprint = Blueprint('api', __name__, url_prefix='/api')
|
||||
|
||||
api_blueprint.register_blueprint(
|
||||
login.views.blueprint, url_prefix='/login')
|
||||
api_blueprint.register_blueprint(
|
||||
target_exchange.views.blueprint, url_prefix='/target-exchange')
|
||||
api_blueprint.register_blueprint(
|
||||
target.views.blueprint, url_prefix='/target')
|
||||
api_blueprint.register_blueprint(login.views.blueprint, url_prefix='/login')
|
||||
api_blueprint.register_blueprint(target_exchange.views.blueprint, url_prefix='/target-exchange')
|
||||
api_blueprint.register_blueprint(target.views.blueprint, url_prefix='/target')
|
||||
api_blueprint.register_blueprint(registration.views.blueprint, url_prefix='/registration')
|
||||
|
||||
app.register_blueprint(api_blueprint)
|
||||
|
||||
@@ -85,7 +83,8 @@ def register_shellcontext(app: Flask):
|
||||
return {
|
||||
'db': db,
|
||||
'TargetExchange': target_exchange.models.TargetExchange,
|
||||
'Target': target.models.Target
|
||||
'Target': target.models.Target,
|
||||
'Registration': registration.models.Registration,
|
||||
}
|
||||
|
||||
app.shell_context_processor(shell_context)
|
||||
|
||||
Reference in New Issue
Block a user