本文整理汇总了Python中models.Sporocilo类的典型用法代码示例。如果您正苦于以下问题:Python Sporocilo类的具体用法?Python Sporocilo怎么用?Python Sporocilo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Sporocilo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: post
def post(self):
sporocilo = self.request.get("vnos")
sporocilo_v_bazi = Sporocilo(besedilo=sporocilo)
sporocilo_v_bazi.put()
return self.write("Vpisal si: " + sporocilo)
示例2: post
def post(self):
rezultat = self.request.get("vnos")
sporocilo = Sporocilo(vnos=rezultat)
sporocilo.put()
self.write(rezultat)
示例3: post
def post(self):
dodatno = "Uporabnik je vpisal: "
rezultat = self.request.get("vnos")
skupaj = dodatno + rezultat # zdruzimo zgornja dva stringa v enega
params = {"vnos" : skupaj }
sporocilo = Sporocilo(vnos=rezultat)
sporocilo.put()
return self.render_template("hello.html" , params=params)
示例4: post
def post(self):
imeM = self.request.get("ime")
priimekM = self.request.get("priimek")
emailM = self.request.get("email")
sporociloM = self.request.get("sporociloV")
sporocilo = Sporocilo(ime=imeM, priimek=priimekM, email=emailM, sporocilo=sporociloM)
sporocilo.put()
self.write("Posiljanje uspesno")
示例5: post
def post(self):
tekst = self.request.get("sporocilo")
prejemnik1 = self.request.get("prejemnik")
sporocilo = Sporocilo(vnos=tekst, prejemnik=prejemnik1) #prejemnik je iz models
sporocilo.put()
params = {"sporocilo": sporocilo}
self.redirect_to("main")
示例6: post
def post(self):
user_name = self.request.get("user_name")
user_email = self.request.get("user_email")
user_message = self.request.get("user_message")
message = Sporocilo(ime = user_name, email = user_email, sporocilo= user_message)
message.put()
return self.render_template("message-sent.html")
示例7: post
def post(self):
sporocilo = self.request.get('sporocilo')
sporocilo = Sporocilo(sporocilo=sporocilo)
potrditev = "Hvala za tvoje sporocilo :)"
sporocilo.put()
params = {'potrditev':potrditev}
return self.render_template('contact.html', params=params)
示例8: post
def post(self):
sender = self.request.get("Posiljatelj")
recipient = self.request.get("Naslovnik")
message_ = self.request.get("Message")
sporocilo = Sporocilo(Posiljatelj = sender, Naslovnik = recipient, Message = message_)
sporocilo.put()
self.write("Sporocilo je bilo uspesno poslano")
示例9: post
def post(self):
uporabnikovo_ime = self.request.get("ime")
uporabnikovo_sporocilo = self.request.get("sporocilo")
uporabnikov_email = self.request.get("email")
sporocilo = Sporocilo(ime=uporabnikovo_ime, tekst=uporabnikovo_sporocilo, email = uporabnikov_email)
sporocilo.put()
return self.render_template("sporocilo-poslano.html")
示例10: post
def post(self):
name = self.request.get("name")
mail = self.request.get("mail")
text = self.request.get("text")
sporocilo = Sporocilo(name=name, mail=mail, text=text)
sporocilo.put()
self.render_template("rezultat.html")
示例11: post
def post(self):
uporabnikovo_ime = self.request.get("ime")
uporabnikovo_sporocilo = self.request.get("sporocilo")
uporabnikovo_ime = cgi.escape(uporabnikovo_ime)
uporabnikovo_sporocilo = cgi.escape(uporabnikovo_sporocilo)
sporocilo = Sporocilo(ime=uporabnikovo_ime, tekst=uporabnikovo_sporocilo)
sporocilo.put()
self.redirect("/prikazi-sporocila")
示例12: post
def post(self):
usr_ime = self.request.get("usr_ime")
usr_email = self.request.get("usr_email")
usr_sporocilo = self.request.get("usr_sporocilo")
if usr_ime == "":
usr_ime = "unknown"
sporocilo = Sporocilo(ime=usr_ime, email=usr_email, message=usr_sporocilo)
sporocilo.put()
return self.render_template("message.html")
示例13: post
def post(self):
ime = self.request.get("ime")
email = self.request.get("email")
sporocilo = self.request.get("sporocilo")
if ime == "":
ime = "Neznanec"
if email == "":
email = "Neizpolnjen"
sporocilo1 = Sporocilo(ime=ime, email=email, sporocilo=sporocilo)
sporocilo1.put()
self.render_template("poslano.html")
示例14: get
def get(self, sporocilo_id):
sporocilo = Sporocilo.get_by_id(int(sporocilo_id))
params = {"sporocilo": sporocilo}
return self.render_template("izbrisi_sporocilo.html",
params=params)
示例15: get
def get(self):
uporabnik = users.get_current_user()
if uporabnik:
seznam_sporocil = Sporocilo.query().order(-Sporocilo.nastanek).fetch()
params = {'seznam': seznam_sporocil, 'uporabnik':uporabnik}
return self.render_template('admin.html', params=params)
else:
self.redirect_to('prijava')