Skip to content

Commit 1f23c3c

Browse files
committed
updated shell context
1 parent 5e751a3 commit 1f23c3c

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

{{cookiecutter.app_slug}}/manage.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,6 @@
2727
COV.start()
2828

2929

30-
@app.shell_context_processor
31-
def make_shell_context():
32-
return dict(app=app, db=db)
33-
34-
3530
@cli.command()
3631
def create_db():
3732
db.drop_all()

{{cookiecutter.app_slug}}/project/server/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,7 @@ def page_not_found(error):
7575
def server_error_page(error):
7676
return render_template('errors/500.html'), 500
7777

78+
# shell context for flask cli
79+
app.shell_context_processor({'app': app, 'db': db})
80+
7881
return app

0 commit comments

Comments
 (0)