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

Make elsa work with FLASK_APP #32

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

Make elsa work with FLASK_APP #32

encukou opened this issue Mar 15, 2017 · 2 comments
Assignees

Comments

@encukou
Copy link
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
Copy link
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
Copy link
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()

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