forked from iti-framework/iTi-Flask
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.0 KiB
Python
44 lines
1.0 KiB
Python
from .error_views import init_error_views
|
|
from .limit import init_limiter, limiter
|
|
from .jwt import init_jwt, jwt
|
|
from .db import init_db, db, ma
|
|
from .migrate import init_migrate, migrate
|
|
from .plugins import init_plugin, broadcast_execute
|
|
from .encoder import init_encoder
|
|
from .moment import init_moment, moment
|
|
from .http import init_http
|
|
from .error_handler import init_error_handler
|
|
from .cache import init_cache, cache_simple, cache_redis
|
|
from .sys_log import init_sys_log, sys_log
|
|
from .event_bus import init_eventbus, eventbus
|
|
from iti.applications.common.logger import init_logger
|
|
|
|
|
|
def init_exts(app) -> None:
|
|
# 日志
|
|
init_logger(app)
|
|
|
|
# 插件
|
|
init_plugin(app)
|
|
broadcast_execute(app, "event_begin")
|
|
|
|
# http
|
|
init_http(app)
|
|
|
|
# json
|
|
init_encoder(app)
|
|
init_moment(app)
|
|
|
|
# flask 扩展
|
|
init_db(app)
|
|
init_jwt(app)
|
|
init_migrate(app)
|
|
init_limiter(app)
|
|
init_cache(app)
|
|
init_sys_log(app)
|
|
init_eventbus(app)
|
|
|
|
# 系统蓝图相关
|
|
init_error_views(app)
|
|
init_error_handler(app)
|