-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmanage.py
More file actions
36 lines (31 loc) · 788 Bytes
/
manage.py
File metadata and controls
36 lines (31 loc) · 788 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import os
# noinspection PyPackageRequirements
from flask_migrate import Migrate
from arctic_office_projects_api import create_app, db
from arctic_office_projects_api.models import (
Project,
Person,
Participant,
Grant,
Allocation,
Organisation,
CategoryScheme,
CategoryTerm,
Categorisation
)
app = create_app(os.getenv('FLASK_ENV') or 'default')
migrate = Migrate(app, db)
@app.shell_context_processor
def make_shell_context():
return dict(
db=db,
Project=Project,
Person=Person,
Participant=Participant,
Grant=Grant,
Allocation=Allocation,
Organisation=Organisation,
CategoryScheme=CategoryScheme,
CategoryTerm=CategoryTerm,
Categorisation=Categorisation
)