rating_tool.py 1.45 KB
Newer Older
Timo Heikkilä's avatar
Timo Heikkilä committed
1
2
3
4
5
6
from app import app, db, babel
from app.models import background_question, background_question_option
from app.models import experiment
from app.models import answer_set
from app.models import background_question_answer
from app.models import question, page, answer
Timo Heikkilä's avatar
Timo Heikkilä committed
7
from app.models import user, trial_randomization, forced_id
Timo Heikkilä's avatar
Timo Heikkilä committed
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22



@app.shell_context_processor
def make_shell_context():
    return {'db': db, 
            'background_question': background_question,
            'background_question_option': background_question_option,
            'experiment': experiment,
            'answer_set': answer_set,
            'background_question_answer': background_question_answer,
            'question': question,
            'page': page,
            'answer': answer,
            'user': user,
Timo Heikkilä's avatar
Timo Heikkilä committed
23
24
            'trial_randomization': trial_randomization,
            'forced_id': forced_id
Timo Heikkilä's avatar
Timo Heikkilä committed
25
26
27
            }


Timo Heikkilä's avatar
Timo Heikkilä committed
28

Timo Heikkilä's avatar
Timo Heikkilä committed
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
"""

from app import app, db
from app.models import Background_question, Background_question_answer
from app.models import Experiment, Question, Answer_set
from app.models import Page, Answer

@app.shell_context_processor
def make_shell_context():
    return {'db': db, 
            'Background_question': Background_question,
            'Background_question_answer': Background_question_answer,
            'Experiment': Experiment,
            'Question': Question,
            'Answer_set': Answer_set,
            'Page': Page,
            'Answer': Answer,
            }
"""