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

Make elsa work with FLASK_APP #32

Open
encukou opened this Issue Mar 15, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@encukou
Member

encukou commented Mar 15, 2017

Flask's new api uses FLASK_APP=mysite.py flask run instead of app.run(). This solves a few problems related to importing under the debug reloader.

It would be nice if elsa supported this as well, so users could switch from plain Flask to elsa by leaving $FLASK_APP as is and just calling elsa freeze.

There would need to be an option to use a custom freezer and options (e.g. base URL). Probably these would be set in app.config. (Maybe flask/frozen flask has this already?)

Related: we should also enable people to use elsa programmatically, something like Elsa(app).freeze().

@hroncok

This comment has been minimized.

Member

hroncok commented Mar 15, 2017

There is

app.config['FREEZER_DESTINATION'] = path
app.config['FREEZER_BASE_URL'] = base_url

in Elsa, so we can start with that

@hroncok

This comment has been minimized.

Member

hroncok commented Jun 27, 2017

Let me start with the easy part, enable people to use elsa programmatically. I kinda think it will make the FLASK_APP part easier anyway.

It would also allow the user to modify the freezer once created, i.e.:

elsa = Elsa(app)
elsa.freezer.whatnot()
elsa.freeze()

hroncok added a commit to hroncok/elsa that referenced this issue Jun 28, 2017

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