added target entity
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
from flask import Flask, Blueprint
|
||||
from . import commands, login, target_exchange
|
||||
from . import commands, login, target_exchange, target
|
||||
from .settings import ProdConfig, Config
|
||||
from .extensions import db, migrate, jwt, apispec
|
||||
from .exceptions import ApiException
|
||||
@@ -40,6 +40,8 @@ def register_blueprints(app: Flask):
|
||||
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')
|
||||
|
||||
app.register_blueprint(api_blueprint)
|
||||
|
||||
@@ -80,7 +82,8 @@ def register_shellcontext(app: Flask):
|
||||
"""Shell context objects."""
|
||||
return {
|
||||
'db': db,
|
||||
'TargetExchange': target_exchange.models.TargetExchange
|
||||
'TargetExchange': target_exchange.models.TargetExchange,
|
||||
'Target': target.models.Target
|
||||
}
|
||||
|
||||
app.shell_context_processor(shell_context)
|
||||
|
||||
Reference in New Issue
Block a user