base.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:fleaker 作者: croscon 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号