def post_create_app(cls, app, **settings):
        """Init the extension for our chosen ORM Backend, if possible.

        This method will ensure that the ``db`` proxy is set to the right
        extension and that that extension is properly created and configured.
        Since it needs to call ``init_app`` it MUST be a Post Create Hook.

        If the chosen backend is PeeWee and no ``DATABASE`` config value is
        provided, we will delay initializing the extension until one is.

        Args:
            app (flask.Flask): The Flask application that was just made through
                the :meth:`create_app` factory that we should bind extensions
                to.

        Kwargs:
            orm_backend (str): If you want to explicitly specify an ORM Backend
                to use, you should send it in this kwarg. Valid values are
                either: ``'peewee'`` or ``'sqlalchemy'``.
            peewee_database (str): An explicit database connection URI we
                should immeditately add to the configuration that should be
                used to configure the PeeWee ORM Backend. This will result in
                the ``DATABASE`` key being set to this value in the config and
                will result in the PeeWee Flask extension being initialized
                IMMEDIATELY and not delayed until the next call to
                :meth:`configure`.

        Returns:
            flask.Flask: Returns the app it was given once this is done.

        Raises:
            RuntimeError: This is raised if we are asked to create the PeeWee
                ORM, but are not given a database URI in either the
                ``DATABASE`` config value, or the explicit ``peewee_database``
                setting.
        """
        global _SELECTED_BACKEND
        backend = settings.pop('orm_backend', None)
        backend = _discover_ideal_backend(backend)

        # did not specify a backend, bail early
        if backend is MISSING:
            return app

        _swap_backends_error = ('Cannot swap ORM backends after one is '
                                'declared!')

        if backend == _PEEWEE_BACKEND:
            if (_SELECTED_BACKEND is not MISSING
                    and _SELECTED_BACKEND != _PEEWEE_EXT):
                raise RuntimeError(_swap_backends_error)

            # @TODO (orm): Does this really need to be ``peewee_database``? can
            # it be ``orm_database``?
            database_uri = settings.pop('peewee_database', None)
            if database_uri:
                app.config['DATABASE'] = database_uri

            if 'DATABASE' not in app.config:
                # since there is no DATABASE in the config, we need to wait
                # until we init this; so we'll just do it after configure is
                # called.
                try:
                    app.add_post_configure_callback(
                        partial(cls._init_peewee_ext, app),
                        run_once=True
                    )
                except NotImplementedError:
                    # this composed app doesn't implement multi-stage
                    # configuration, so there's no way we can proceed without
                    # an explicit DB =/; yes it's possible this could swallow
                    # another error, but if it does... the easiest fix is to do
                    # the same
                    # @TODO (docs): Multi Stage Configuration should be in
                    # the docs
                    err_msg = """\
                    The app you are trying to construct does not support
                    Multi Stage Configuration and no connection info for the
                    database was given at creation! Please call `create_app`
                    again and provide your database connection string as the
                    `peewee_database` kwarg!\
                    """
                    raise RuntimeError(err_msg)
            else:
                # the DATABASE is already present, go ahead and just init now
                cls._init_peewee_ext(app)

            _SELECTED_BACKEND = _PEEWEE_EXT

        elif backend == _SQLALCHEMY_BACKEND:
            # @TODO (orm): Finish SQLA implementation
            # do sqla bootstrap code
            if (_SELECTED_BACKEND is not MISSING
                    and _SELECTED_BACKEND != _SQLA_EXT):
                raise RuntimeError(_swap_backends_error)

            _SELECTED_BACKEND = _SQLA_EXT
            _SQLA_EXT.init_app(app)

        else:
            err_msg = ("Explicit ORM backend provided, but could not recognize"
                       " the value! Valid values are: '{}'  and '{}';"
                       " received: '{}' instead!")
            err_msg = err_msg.format(_PEEWEE_BACKEND, _SQLALCHEMY_BACKEND,
                                     backend)

            raise RuntimeError(err_msg)
        return app
Init the extension for our chosen ORM Backend, if possible.

        This method will ensure that the ``db`` proxy is set to the right
        extension and that that extension is properly created and configured.
        Since it needs to call ``init_app`` it MUST be a Post Create Hook.

        If the chosen backend is PeeWee and no ``DATABASE`` config value is
        provided, we will delay initializing the extension until one is.

        Args:
            app (flask.Flask): The Flask application that was just made through
                the :meth:`create_app` factory that we should bind extensions
                to.

        Kwargs:
            orm_backend (str): If you want to explicitly specify an ORM Backend
                to use, you should send it in this kwarg. Valid values are
                either: ``'peewee'`` or ``'sqlalchemy'``.
            peewee_database (str): An explicit database connection URI we
                should immeditately add to the configuration that should be
                used to configure the PeeWee ORM Backend. This will result in
                the ``DATABASE`` key being set to this value in the config and
                will result in the PeeWee Flask extension being initialized
                IMMEDIATELY and not delayed until the next call to
                :meth:`configure`.

        Returns:
            flask.Flask: Returns the app it was given once this is done.

        Raises:
            RuntimeError: This is raised if we are asked to create the PeeWee
                ORM, but are not given a database URI in either the
                ``DATABASE`` config value, or the explicit ``peewee_database``
                setting.