Beispiel #1
0
    def GET(self):
        inp = web.input(first=model.display_date(model.local_time()),
                        last=model.display_date(model.local_time()))
        first = model.input_date(inp.first)
        last = model.input_date(inp.last)
        if last < first:
            last = first

        curr = first
        days = list()
        pts = dict()
        while curr <= last:
            appts = model.appts_on_day(curr)
            for a in appts:
                if a.patientid not in pts:
                    pts[a.patientid] = model.get_pt(a.patientid)
            days.append((curr, appts))
            curr += datetime.timedelta(days=1)
        return hello.render.days(days, pts)
Beispiel #2
0
 def POST(self):
     f = web.input()
     d = model.input_date(f.date)
     raise web.seeother('/oneday/%s' % model.display_date(d))