Exemple #1
0
 def post(self):
     naloga = self.request.get("vpisano")
     dan = self.request.get("dan")
     mesec = self.request.get("mesec")
     leto = self.request.get("leto")
     datum = dan + "." + mesec + "." + leto
     nalogica = TaskManager(besedilo=naloga, rok=datum)
     nalogica.put()
     return self.render_template("rezultat.html")
Exemple #2
0
    def post(self):
        to_do = self.request.get("list")
        status = self.request.get("status")
        status_baza = False
        if status == "on":
            status_baza = True

        save = TaskManager(list=to_do, status=status_baza)
        save.put()

        return self.render_template("save.html")
Exemple #3
0
    def post(self):
        task = self.request.get("task")
        description = self.request.get("description")
        complete_till = self.request.get("complete_till")

        if complete_till == "":
            complete_till = "Not specified"

        task1 = TaskManager(task=task, description=description, complete_till=complete_till)
        task1.put()

        self.render_template("task-added.html")
Exemple #4
0
    def get(self):
        tasks = TaskManager.query(TaskManager.completed == True,
                                  TaskManager.deleted == False).order(TaskManager.created).fetch()

        params = {"tasks": tasks}

        self.render_template("completed-task.html", params)
Exemple #5
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)
Exemple #6
0
    def post(self, task_id):
        task = TaskManager.get_by_id(int(task_id))

        task.deleted = True
        task.put()

        return self.redirect_to("home")
Exemple #7
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")
Exemple #8
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")
Exemple #9
0
    def get(self):
        seznam_neopr = TaskManager.query(
            TaskManager.izbrisano == False,
            TaskManager.narejeno == False).fetch()

        nov_seznam = []
        for item in seznam_neopr:
            cas = item.rok
            cas2 = cas.split(".")
            cas3 = cas2[2] + cas2[1] + cas2[0]
            nov_seznam.append(cas3)
            najblizji = min(nov_seznam)
            indeksmin = nov_seznam.index(najblizji)

        najblizje_opravilo = seznam_neopr[indeksmin]

        podatki = {"najblizje_opravilo": najblizje_opravilo}
        return self.render_template("naslednje_opravilo.html", podatki)
Exemple #10
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")
Exemple #11
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)
Exemple #12
0
    def get(self):
        tasks = TaskManager.query().fetch()
        output = {"tasks": tasks}

        return self.render_template("tasks.html", output)
Exemple #13
0
 def get(self):
     seznam_neopr = TaskManager.query(
         TaskManager.izbrisano == False,
         TaskManager.narejeno == False).fetch()
     podatki = {"seznam_neopr": seznam_neopr}
     return self.render_template("seznam_neopr.html", podatki)
Exemple #14
0
 def post(self, details_id):
     tasks = TaskManager.get_by_id(int(details_id))
     tasks.key.delete()
     return self.redirect("/tasks")
Exemple #15
0
 def get(self, details_id):
     tasks = TaskManager.get_by_id(int(details_id))
     output = {"tasks": tasks}
     return self.render_template("delete.html", output)
Exemple #16
0
    def get(self, task_id):
        task = TaskManager.get_by_id(int(task_id))

        params = {"task": task}

        self.render_template("edit.html", params)
Exemple #17
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")