Cleanup shell context

This commit is contained in:
Patrick Jentsch 2020-01-03 09:53:34 +01:00
parent 310bcba0bc
commit fe084e87bd

View File

@ -1,7 +1,7 @@
import eventlet
eventlet.monkey_patch()
from app import create_app, db, socketio
from app.models import Corpus, User, Role, Permission, Job
from app.models import Corpus, Job, Role, User
from flask_migrate import Migrate
import os
@ -12,12 +12,7 @@ migrate = Migrate(app, db)
@app.shell_context_processor
def make_shell_context():
return dict(db=db,
Corpus=Corpus,
User=User,
Role=Role,
Permission=Permission,
Job=Job)
return {'db': db, 'Corpus': Corpus, 'Job': Job, 'User': User}
@app.cli.command()