def logit(self): timesheet = Timesheet( date=self.form_result['date'], duration=self.form_result['duration'], project=self.form_result['project'], description=self.form_result['description']) timesheet.store() path = request.params.get('next') if not path: path = url(controller="timesheet", action="index") return redirect(path)