Skip to content

Commit 97e34b8

Browse files
authored
Merge pull request #30 from anselal/patch-1
Update cli initialization
2 parents 6f9531c + f964d46 commit 97e34b8

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

manage.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
)
2626
COV.start()
2727

28+
@app.shell_context_processor
29+
def make_shell_context():
30+
return dict(app=app, db=db)
31+
2832
@cli.command()
2933
def create_db():
3034
db.drop_all()

project/server/__init__.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,4 @@ 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-
8178
return app

0 commit comments

Comments
 (0)