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)
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)
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))
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)
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)
def post(self, sporocilo_id): sporocilo = Mail.get_by_id(int(sporocilo_id)) sporocilo.key.delete() self.redirect("prikazi_vsa_sporocila.html")
def post(self, sporocilo_id): sporocilo = Mail.get_by_id(int(sporocilo_id)) sporocilo.key.delete() return self.redirect_to('izbrisano')
def post(self, sporocilo_id): sporocilo = Mail.get_by_id(int(sporocilo_id)) sporocilo.izbrisano = True sporocilo.put() return self.redirect_to('prejeto')