Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

example 'quickhowto2' not working #20

Closed
veflask opened this issue May 27, 2014 · 2 comments
Closed

example 'quickhowto2' not working #20

veflask opened this issue May 27, 2014 · 2 comments
Labels

Comments

@veflask
Copy link
Contributor

veflask commented May 27, 2014

i think it has not been changed compatible to api-rework ( BaseApp to AppBuilder ).

@dpgaspar
Copy link
Owner

Nop, it does not work. I'm using quickhowto2 and quickhowto3 for my own tests.
(Maybe i should put some kind of warning for this).

Quickhowto2 is under test for factory app compliance for flask extension.
You will be able to initialize like this (this is still a work in progress)::

def create_app(config='config'):
    app = Flask(__name__)
    app.config.from_object(config)
    db.init_app(app)
    with app.app_context():
        appbuilder.init_app(app, db.session)
    return app

Hope the api rework did not put you in big trouble, i tried to give has much retro compat has possible. But i think it was worth it, the api is much better know.

@dpgaspar
Copy link
Owner

Sorry was looking at the 0_9_1 branch (still quickhowto2 and 3, i'm using for tests).

You can put it to work changing on views.py::

appbuilder = BaseApp(app, db)

To::

appbuilder = BaseApp(app, db.session)

https://github.com/dpgaspar/Flask-AppBuilder/blob/master/examples/quickhowto2/app/views.py#L77

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants