Ejemplo n.º 1
0
    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)
Ejemplo n.º 2
0
    def post(self, task_id):
        task = TaskManager.get_by_id(int(task_id))

        task.deleted = True
        task.put()

        return self.redirect_to("home")
Ejemplo n.º 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")
Ejemplo n.º 4
0
    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")
Ejemplo n.º 5
0
    def get(self, task_id):
        task = TaskManager.get_by_id(int(task_id))

        params = {"task": task}

        self.render_template("edit.html", params)
Ejemplo n.º 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")
Ejemplo n.º 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)
Ejemplo n.º 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")
Ejemplo n.º 9
0
 def post(self, details_id):
     tasks = TaskManager.get_by_id(int(details_id))
     tasks.key.delete()
     return self.redirect("/tasks")
Ejemplo n.º 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)