Make Corpus model available in flask shell.

This commit is contained in:
Patrick Jentsch 2019-08-06 13:25:10 +02:00
parent 46b8550c65
commit 4ec0acc080

View File

@ -1,5 +1,5 @@
from app import create_app, db from app import create_app, db
from app.models import User, Role, Permission, Job from app.models import Corpus, User, Role, Permission, Job
from flask_migrate import Migrate from flask_migrate import Migrate
import os import os
@ -10,7 +10,7 @@ migrate = Migrate(app, db)
@app.shell_context_processor @app.shell_context_processor
def make_shell_context(): def make_shell_context():
return dict(db=db, User=User, Role=Role, Permission=Permission, Job=Job) return dict(db=db, Corpus=Corpus, User=User, Role=Role, Permission=Permission, Job=Job)
@app.cli.command() @app.cli.command()