Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
nopaque
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SFB 1288 - INF
nopaque
Commits
22114dd4
Commit
22114dd4
authored
4 years ago
by
Stephan Porada
Browse files
Options
Downloads
Patches
Plain Diff
Add all necessary models to flask shell context
parent
8f4cd9a3
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
nopaque.py
+12
-5
12 additions, 5 deletions
nopaque.py
with
12 additions
and
5 deletions
nopaque.py
+
12
−
5
View file @
22114dd4
import
eventlet
eventlet
.
monkey_patch
()
# noqa
from
app
import
create_app
,
db
,
socketio
from
app.models
import
Corpus
,
Job
,
Role
,
User
,
NotificationData
from
app.models
import
(
Corpus
,
CorpusFile
,
Job
,
JobInput
,
JobResult
,
NotificationData
,
NotificationEmailData
,
Role
,
User
)
from
flask_migrate
import
Migrate
,
upgrade
import
os
...
...
@@ -12,11 +13,17 @@ migrate = Migrate(app, db)
@app.shell_context_processor
def
make_shell_context
():
return
{
'
db
'
:
db
,
'
Corpus
'
:
Corpus
,
return
{
'
Corpus
'
:
Corpus
,
'
CorpusFile
'
:
CorpusFile
,
'
db
'
:
db
,
'
Job
'
:
Job
,
'
User
'
:
User
,
'
NotificationData
'
:
NotificationData
}
'
JobInput
'
:
JobInput
,
'
JobResult
'
:
JobResult
,
'
NotificationData
'
:
NotificationData
,
'
NotificationEmailData
'
:
NotificationEmailData
,
'
Role
'
:
Role
,
'
User
'
:
User
}
@app.cli.command
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment