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

Use "flask" command instead of "extranet_" #25

Open
vindarel opened this issue Mar 13, 2017 · 6 comments
Open

Use "flask" command instead of "extranet_" #25

vindarel opened this issue Mar 13, 2017 · 6 comments

Comments

@vindarel
Copy link
Contributor

new since 0.11 http://flask.pocoo.org/docs/0.12/cli/

@vindarel
Copy link
Contributor Author

We need to export a FLASK_APP.

core or other projects don't have a simple app variable in their app.py, but a class that inherits the Flask object:

class Application(Flask, ServiceManager, PluginManager):

and

def create_app(config=None):
    return Application(config)

Defining export FLASK_APP=abilian.app:create_app is not enough.

@sfermigier
Copy link
Member

cf. http://mitsuhiko.pocoo.org/flaskfun.pdf (slides 24+)

@sfermigier
Copy link
Member

One needs a very basic devapp.py in each project that depends on abilian-core.

@sfermigier
Copy link
Member

And to convert existing scripts (that use flask-script) to the new API (should be easy).

@vindarel
Copy link
Contributor Author

OK thanks, a devapp.py at the project root and export FLASK_APP=devapp works.

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

No branches or pull requests

2 participants