def get(self, task_id): task = TaskManager.get_by_id(int(task_id)) completed = self.request.get("completed") params = {"task": task, "completed": completed} self.render_template("task.html", params)
def post(self, task_id): task = TaskManager.get_by_id(int(task_id)) task.deleted = True task.put() return self.redirect_to("home")
def post(self, details_id): tasks = TaskManager.get_by_id(int(details_id)) tasks.list = self.request.get("list") tasks.status = self.request.get("status") tasks.status_baza = False if tasks.status == "on": tasks.status_baza = True tasks.put() return self.redirect("/tasks")
def post(self, task_id): edit_task = self.request.get("task2") edit_description = self.request.get("description2") edit_complete_till = self.request.get("complete_till2") task = TaskManager.get_by_id(int(task_id)) task.task = edit_task task.description = edit_description task.complete_till = edit_complete_till task.put() return self.redirect_to("home")
def get(self, task_id): task = TaskManager.get_by_id(int(task_id)) params = {"task": task} self.render_template("edit.html", params)
def post(self, vnos_id): sporocilce = TaskManager.get_by_id(int(vnos_id)) sporocilce.izbrisano = True sporocilce.put() return self.redirect_to("seznam-neopravljenih")
def get(self, vnos_id): sporocilce = TaskManager.get_by_id(int(vnos_id)) params = {"posamezno_sporocilce": sporocilce} return self.render_template("izbrisano.html", params=params)
def post(self, vnos_id): sporocilce = TaskManager.get_by_id(int(vnos_id)) sporocilce.besedilo = self.request.get("novo-besedilo") sporocilce.rok = self.request.get("nov-rok") sporocilce.put() return self.redirect_to("seznam-neopravljenih")
def post(self, details_id): tasks = TaskManager.get_by_id(int(details_id)) tasks.key.delete() return self.redirect("/tasks")
def get(self, details_id): tasks = TaskManager.get_by_id(int(details_id)) output = {"tasks": tasks} return self.render_template("delete.html", output)