예제 #1
0
    def get(self, mail_id):
        user = users.get_current_user()
        logout_url = users.create_logout_url('/')
        mail = Mail.get_by_id(int(mail_id))

        params = {"logout_url": logout_url, "user": user, "mail_id": mail}
        return self.render_template("prejeto.html", params=params)
예제 #2
0
    def get(self, sporocilo_id):
        sporocilo = Mail.get_by_id(int(sporocilo_id))

        view_vars = {
            "sporocilo": sporocilo
        }

        self.render_template("izbrisi_sporocilo.html", view_vars)
예제 #3
0
    def post(self, sporocilo_id):
        sporocilo = Mail.get_by_id(int(sporocilo_id))
        sporocilo.zadeva = self.request.get("zadeva")
        sporocilo.vsebina = int(self.request.get("vsebina"))
        sporocilo.idprejemnika = self.request.get("idprejemnika")
        sporocilo.put()

        self.redirect("/sporocilo/" + int(sporocilo_id))
예제 #4
0
    def post(self, mail_id):
        user = users.get_current_user()
        logout_url = users.create_logout_url('/')
        email_data = Mail.query(Mail.izbrisan == False).fetch()
        mail = Mail.get_by_id(int(mail_id))

        mail.izbrisan = True
        mail.put()

        params = {
            "logout_url": logout_url,
            "user": user,
            "email_data": email_data,
            "izbris": u"Sporočilo uspešno izbrisano"
        }
        return self.render_template("poslano.html", params=params)
예제 #5
0
    def get(self, sporocilo_id):
        user = users.get_current_user()
        if user:
            logiran = True
            logout_url = users.create_logout_url('/')
            params = {"logiran": logiran, "logout_url": logout_url, "user": user}
        else:
            logiran = False
            login_url = users.create_login_url('/')
            params = {"logiran": logiran, "login_url": login_url, "user": user}

        sporocilo = Mail.get_by_id(int(sporocilo_id))
        sporocilo.prebrano = True
        sporocilo.put()

        podatki = {'sporocilo': sporocilo}
        podatki.update(params)
        return self.render_template("preberi.html",params=podatki)
예제 #6
0
    def post(self, sporocilo_id):
        sporocilo = Mail.get_by_id(int(sporocilo_id))
        sporocilo.key.delete()

        self.redirect("prikazi_vsa_sporocila.html")
예제 #7
0
 def post(self, sporocilo_id):
     sporocilo = Mail.get_by_id(int(sporocilo_id))
     sporocilo.key.delete()
     return self.redirect_to('izbrisano')
예제 #8
0
 def post(self, sporocilo_id):
     sporocilo = Mail.get_by_id(int(sporocilo_id))
     sporocilo.izbrisano = True
     sporocilo.put()
     return self.redirect_to('prejeto')