本文整理汇总了Python中models.Sporocilo.put方法的典型用法代码示例。如果您正苦于以下问题:Python Sporocilo.put方法的具体用法?Python Sporocilo.put怎么用?Python Sporocilo.put使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类models.Sporocilo
的用法示例。
在下文中一共展示了Sporocilo.put方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: post
# 需要导入模块: from models import Sporocilo [as 别名]
# 或者: from models.Sporocilo import put [as 别名]
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
# 需要导入模块: from models import Sporocilo [as 别名]
# 或者: from models.Sporocilo import put [as 别名]
def post(self):
rezultat = self.request.get("vnos")
sporocilo = Sporocilo(vnos=rezultat)
sporocilo.put()
self.write(rezultat)
示例3: post
# 需要导入模块: from models import Sporocilo [as 别名]
# 或者: from models.Sporocilo import put [as 别名]
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
# 需要导入模块: from models import Sporocilo [as 别名]
# 或者: from models.Sporocilo import put [as 别名]
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
# 需要导入模块: from models import Sporocilo [as 别名]
# 或者: from models.Sporocilo import put [as 别名]
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)
示例6: post
# 需要导入模块: from models import Sporocilo [as 别名]
# 或者: from models.Sporocilo import put [as 别名]
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
# 需要导入模块: from models import Sporocilo [as 别名]
# 或者: from models.Sporocilo import put [as 别名]
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")
示例8: post
# 需要导入模块: from models import Sporocilo [as 别名]
# 或者: from models.Sporocilo import put [as 别名]
def post(self):
sporocilo = Sporocilo()
sporocilo.ime_priimek = self.request.get("ime_priimek")
sporocilo.email = self.request.get("email")
sporocilo.tekst = self.request.get("tekst")
sporocilo.put()
self.render("rezultat.html")
示例9: post
# 需要导入模块: from models import Sporocilo [as 别名]
# 或者: from models.Sporocilo import put [as 别名]
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")
示例10: post
# 需要导入模块: from models import Sporocilo [as 别名]
# 或者: from models.Sporocilo import put [as 别名]
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")
示例11: post
# 需要导入模块: from models import Sporocilo [as 别名]
# 或者: from models.Sporocilo import put [as 别名]
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")
示例12: post
# 需要导入模块: from models import Sporocilo [as 别名]
# 或者: from models.Sporocilo import put [as 别名]
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")
示例13: post
# 需要导入模块: from models import Sporocilo [as 别名]
# 或者: from models.Sporocilo import put [as 别名]
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")
示例14: post
# 需要导入模块: from models import Sporocilo [as 别名]
# 或者: from models.Sporocilo import put [as 别名]
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")
示例15: post
# 需要导入模块: from models import Sporocilo [as 别名]
# 或者: from models.Sporocilo import put [as 别名]
def post(self):
zadeva = self.request.get("zadeva")
tekst = self.request.get("tekst")
email_prejemnika = self.request.get("email_prejemnika")
zadeva = cgi.escape(zadeva)
tekst = cgi.escape(tekst)
cookie_value = self.request.cookies.get("uid")
uporabnik_id, _, _ = cookie_value.split(":")
uporabnik_id = int(uporabnik_id)
prejemnik = Uporabnik.gql("WHERE email='"+ email_prejemnika +"'").get()
prejemnik_id= prejemnik.key.id()
sporocilo = Sporocilo(uporabnik_id=uporabnik_id, prejemnik_id=prejemnik_id, email_prejemnika=email_prejemnika ,zadeva=zadeva, tekst=tekst)
sporocilo.put()
self.redirect("/prikazi-sporocila")