Open vindarel opened 7 years ago
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.
cf. http://mitsuhiko.pocoo.org/flaskfun.pdf (slides 24+)
One needs a very basic devapp.py
in each project that depends on abilian-core
.
And to convert existing scripts (that use flask-script
) to the new API (should be easy).
OK thanks, a devapp.py at the project root and export FLASK_APP=devapp
works.
new since 0.11 http://flask.pocoo.org/docs/0.12/cli/