def pre_create_app(cls, **settings):
"""Run any logic that needs to be done strictly before the app has been
made.
The Pre Create Hook will be run immediately before :meth:`create_app`
is run. It will be given the kwargs that were passed to
:meth:`create_app` as it's kwargs. It is expected to return
a dictionary of kwargs that will be passed to the actual App
``__init__`` call and to the :meth:`post_create_app` hook.
Basically, this lets you hook in and parse or change settings
dynamically. That's it's only goal and what it can do is up to you!
.. admonition:: Make Sure You Call ``super``!
A failure to call `super` in a hook method, such as the Pre Create
Hook, is likely to break your **entire Fleaker App chain**! Make
sure the very first, or very last, thing that your hook does is
call `super`!
"""
return settings
评论列表
文章目录