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

Add support for Flask shell context #1

Merged
merged 2 commits into from Oct 26, 2017

Conversation

sbhtw
Copy link

@sbhtw sbhtw commented Oct 26, 2017

flask konch should optionally use Flask's shell context (which is registered via `app.shell_context_processor(f)``). Flask shell context is available since Flask 0.11 (see http://flask.pocoo.org/docs/0.12/api/)

This allows it to use variables defined like here at cookiecutter-flask without the need for a separate (duplicated) KONCH_CONTEXT.

This PR implements this, including tests and an option KONCH_FLASK_SHELL_CONTEXT to turn it off (on by default).

@sloria
Copy link
Owner

sloria commented Oct 26, 2017

Makes sense to me. Thanks!

@sloria sloria merged commit c62ae9a into sloria:master Oct 26, 2017
@sloria
Copy link
Owner

sloria commented Oct 26, 2017

This is released in 1.2.0.

Also, I've invited you to have commit access to this project. No pressure to do any more work than you already have; just wanted to open the door to further collaboration.

@sbhtw
Copy link
Author

sbhtw commented Oct 26, 2017

Hey, thanks for this nice offer. I really appreciate this. But this if too dangerous for now, as I have to call myself a Python rookie and I'm still making way too many beginner mistakes.

Maybe in the future. Btw, I really like your other projects, especially cookiecutter-flask, which I rely heavily upon.

@sbhtw sbhtw deleted the flask_shell_context branch October 26, 2017 12:18
@sloria
Copy link
Owner

sloria commented Oct 26, 2017

No pressure to do anything you're uncomfortable with. You can still send PRs for review. You don't have to make commits directly to the repo. Having commit access also means that you can review and merge PRs.

Thanks for the kind words!

@sbhtw sbhtw restored the flask_shell_context branch September 4, 2018 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants