示例#1
0
 def date(self, date):
     c.title = "Log Time for %s" % date
     c.entry_title = "Timesheets for %s" % date
     c.timesheets = Timesheet.for_date(date)
     # Would it be optimal to do this inside couchdb using a reduce function?
     c.total_time = sum(t.duration for t in c.timesheets)
     c.total_fee = sum(t.fee for t in c.timesheets)
     c.date = datetime.datetime.strptime(date, "%Y-%m-%d").date()
     c.project_list = Project.project_list()
     return render('/timesheet/timeform.html')
示例#2
0
 def index(self):
     today = datetime.date.today()
     c.title = "Log Time"
     c.entry_title = "Uninvoiced Entries"
     c.timesheets = Timesheet.all_timesheets(unbilled=True)
     c.total_time = sum(t.duration for t in c.timesheets)
     c.total_fee = sum(t.fee for t in c.timesheets)
     c.project_list = Project.project_list()
     c.date = datetime.date.today()
     c.delete_column = True
     return render('/timesheet/timeform.html')
示例#3
0
 def list(self):
     c.projects = Project.project_list()
     return render('/project/project_list.html')