/
seedqs.py
23 lines (17 loc) · 1.21 KB
/
seedqs.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#This is the file I will use to see the question table in the database.
import model
pre_run = model.Question(question="How did you feel before the run?: ", minimum = 0, maximum =5)
during_run = model.Question(question="How did you feel during the run?: ", minimum = 0, maximum =5)
post_run = model.Question(question="How did you feel after the run?: ", minimum = 0, maximum =5)
energy = model.Question(question="How would you rate your energy today?: ", minimum = 0, maximum =5)
feeling = model.Question(question="Select a word to describe how you are feeling: ")
location = model.Question(question="Select a word to describe where you ran: ")
terrain = model.Question(question="Select a word to describe the terrain: ")
route = model.Question(question="Select a word to describe the route you: ")
thoughts = model.Question(question="Any additional thoughts? ")
instagram_embed = model.Question(question="Input the instagram embed code for an image that you would like to associate with the run. ")
questions = [pre_run, during_run, post_run, energy, feeling, location, terrain, route, thoughts, instagram_embed]
def seed(question_list):
for question in question_list:
model.sqla_session.add(question)
model.sqla_session.commit()