예제 #1
0
def update():
  chores = getChores()
  for c in chores:
    if(date.today()-c.lastRotate > timedelta(weeks=1)):
      c.untilRotate -= int((date.today()-c.lastRotate).days/7)
      c.lastRotate = date.today()
  db.session.commit()
예제 #2
0
def index():
  people = getPeople()
  chores = getChores()
  update()
  rotate()
  multiSelect()
  return render_template('template.html', people = people, chores = chores)