示例#1
0
文件: main.py 项目: Kocl9262/ToDo
    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)
示例#2
0
文件: main.py 项目: Kocl9262/ToDo
    def post(self, task_id):
        task = TaskManager.get_by_id(int(task_id))

        task.deleted = True
        task.put()

        return self.redirect_to("home")
示例#3
0
    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")
示例#4
0
文件: main.py 项目: Kocl9262/ToDo
    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")
示例#5
0
文件: main.py 项目: Kocl9262/ToDo
    def get(self, task_id):
        task = TaskManager.get_by_id(int(task_id))

        params = {"task": task}

        self.render_template("edit.html", params)
示例#6
0
 def post(self, vnos_id):
     sporocilce = TaskManager.get_by_id(int(vnos_id))
     sporocilce.izbrisano = True
     sporocilce.put()
     return self.redirect_to("seznam-neopravljenih")
示例#7
0
 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)
示例#8
0
 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")
示例#9
0
 def post(self, details_id):
     tasks = TaskManager.get_by_id(int(details_id))
     tasks.key.delete()
     return self.redirect("/tasks")
示例#10
0
 def get(self, details_id):
     tasks = TaskManager.get_by_id(int(details_id))
     output = {"tasks": tasks}
     return self.render_template("delete.html", output)