-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodels.py
More file actions
21 lines (17 loc) · 717 Bytes
/
models.py
File metadata and controls
21 lines (17 loc) · 717 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from google.appengine.ext import db
from google.appengine.api import users
exercises = { 'pushups' : ('pushups', 'reps', 10),
'pullups' : ('pullups', 'reps', 10),
'burpees' : ('burpees', 'reps', 20),
'squats' : ('squats', 'reps', 10),
'punching' : ('punching', 'minutes', 60),
'jumping' : ('jumping', 'minutes', 40),
'plank' : ('plank', 'minutes', 60) }
class Entry(db.Model):
reps = db.IntegerProperty()
points = db.IntegerProperty()
date = db.DateTimeProperty()
name = db.StringProperty(choices=set(exercises.keys()))
class Contest(db.Model):
participants = db.ListProperty(users.User)
user = db.UserProperty()