当前位置: 首页>>代码示例>>Python>>正文


Python Sporocilo.get_by_id方法代码示例

本文整理汇总了Python中models.Sporocilo.get_by_id方法的典型用法代码示例。如果您正苦于以下问题:Python Sporocilo.get_by_id方法的具体用法?Python Sporocilo.get_by_id怎么用?Python Sporocilo.get_by_id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在models.Sporocilo的用法示例。


在下文中一共展示了Sporocilo.get_by_id方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: post

# 需要导入模块: from models import Sporocilo [as 别名]
# 或者: from models.Sporocilo import get_by_id [as 别名]
    def post(self, sporocilo_id):

        sporocilo = Sporocilo.get_by_id(int(sporocilo_id))
        sporocilo.izbrisan = True
        sporocilo.put()

        self.redirect_to("seznam")
开发者ID:MihaGasper,项目名称:GuestBook,代码行数:9,代码来源:main.py

示例2: post

# 需要导入模块: from models import Sporocilo [as 别名]
# 或者: from models.Sporocilo import get_by_id [as 别名]
    def post(self, deleted_note_id):
        deleted_note = Sporocilo.get_by_id(int(deleted_note_id))

        deleted_note.izbrisano = False
        deleted_note.put()

        return self.redirect_to("izbrisana_sporocila")
开发者ID:Kocl9262,项目名称:GuestBook,代码行数:9,代码来源:main.py

示例3: get

# 需要导入模块: from models import Sporocilo [as 别名]
# 或者: from models.Sporocilo import get_by_id [as 别名]
    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)
开发者ID:jO-Osko,项目名称:snit-edit-delete,代码行数:9,代码来源:main.py

示例4: post

# 需要导入模块: from models import Sporocilo [as 别名]
# 或者: from models.Sporocilo import get_by_id [as 别名]
    def post(self, sporocilo_id):
        novo_besedilo = self.request.get("besedilo")
        sporocilo = Sporocilo.get_by_id(int(sporocilo_id))
        sporocilo.besedilo = novo_besedilo
        sporocilo.put()

        return self.redirect_to("seznam-sporocil")
开发者ID:jO-Osko,项目名称:snit-edit-delete,代码行数:9,代码来源:main.py

示例5: get

# 需要导入模块: from models import Sporocilo [as 别名]
# 或者: from models.Sporocilo import get_by_id [as 别名]
 def get(self, sporocilo_id):
     uporabnik = users.get_current_user()
     if uporabnik:
         pos_sporocilo = Sporocilo.get_by_id(int(sporocilo_id))
         params = {'uporabnik': uporabnik, 'sporocilo': pos_sporocilo}
         return  self.render_template('sporocilo_podrobno.html', params=params)
     else:
         return self.redirect_to('prijava')
开发者ID:jpirih,项目名称:Homepage,代码行数:10,代码来源:handlers.py

示例6: post

# 需要导入模块: from models import Sporocilo [as 别名]
# 或者: from models.Sporocilo import get_by_id [as 别名]
    def post(self, sporocilo_id):
        sporocilo = Sporocilo.get_by_id(int(sporocilo_id))
        sporocilo.ime = self.request.get("ime")
        sporocilo.email = self.request.get("email")
        sporocilo.tekst = self.request.get("sporocilo")
        sporocilo.put()

        self.redirect("/sporocilo/" + sporocilo_id)
开发者ID:patt19823,项目名称:patriciin_chat_remove_add_msg,代码行数:10,代码来源:main.py

示例7: get

# 需要导入模块: from models import Sporocilo [as 别名]
# 或者: from models.Sporocilo import get_by_id [as 别名]
    def get(self, sporocilo_id):
        sporocilo = Sporocilo.get_by_id(int(sporocilo_id))

        view_vars = {
            "sporocilo": sporocilo
        }

        return self.render_template("izbrisi_sporocilo.html", view_vars)
开发者ID:patt19823,项目名称:patriciin_chat_remove_add_msg,代码行数:10,代码来源:main.py

示例8: post

# 需要导入模块: from models import Sporocilo [as 别名]
# 或者: from models.Sporocilo import get_by_id [as 别名]
    def post(self, sporocilo_id):
     pos_sporocilo = Sporocilo.get_by_id(int(sporocilo_id))
     obdelan = self.request.get('obdelan')
     if obdelan == 'yes' :
         pos_sporocilo.obdelan = 'Obdelan'
         pos_sporocilo.put()
     elif obdelan == 'progress':
         pos_sporocilo.obdelan == 'V obdelavi'
         pos_sporocilo.put()
     elif obdelan == 'spam':
         pos_sporocilo.obdelan == 'Nepomembno'
         pos_sporocilo.put()
     else:
         pos_sporocilo.obdelan == ' '
         pos_sporocilo.put()

     return self.redirect_to('admin')
开发者ID:jpirih,项目名称:Homepage,代码行数:19,代码来源:handlers.py

示例9: post

# 需要导入模块: from models import Sporocilo [as 别名]
# 或者: from models.Sporocilo import get_by_id [as 别名]
 def post(self, sporocilo_id):
     vnos = self.request.get("vnos")
     sporocilo = Sporocilo.get_by_id(int(sporocilo_id))
     sporocilo.vnos = vnos
     sporocilo.put()
     self.redirect_to("seznam-sporocil")
开发者ID:ZeroCool51,项目名称:smartninja,代码行数:8,代码来源:main.py

示例10: get

# 需要导入模块: from models import Sporocilo [as 别名]
# 或者: from models.Sporocilo import get_by_id [as 别名]
    def get(self, note_id):
        note = Sporocilo.get_by_id(int(note_id))

        params = {"note": note}

        self.render_template("uredi.html", params)
开发者ID:Kocl9262,项目名称:GuestBook,代码行数:8,代码来源:main.py

示例11: get

# 需要导入模块: from models import Sporocilo [as 别名]
# 或者: from models.Sporocilo import get_by_id [as 别名]
 def get(self,shranjeno_sporocilo_id):
     shranjeno_sporocilo=Sporocilo.get_by_id(int(shranjeno_sporocilo_id))
     params={"shranjeno_sporocilo":shranjeno_sporocilo}
     return self.render_template("posamezno-sporocilo.html", params=params)
开发者ID:Roxon,项目名称:smartninja,代码行数:6,代码来源:main.py

示例12: post

# 需要导入模块: from models import Sporocilo [as 别名]
# 或者: from models.Sporocilo import get_by_id [as 别名]
 def post(self, sporocilo_id):
     ime = self.request.get("ime")
     sporocilo = Sporocilo.get_by_id(int(sporocilo_id))
     sporocilo.ime = ime
     sporocilo.put()
     self.redirect_to("seznam-sporocil")
开发者ID:TomazLipuscek,项目名称:Test-Bootstrap-GAE-Python,代码行数:8,代码来源:main.py

示例13: get

# 需要导入模块: from models import Sporocilo [as 别名]
# 或者: from models.Sporocilo import get_by_id [as 别名]
 def get(self, sporocilo_id):
     sporocilo = Sporocilo.get_by_id(int(sporocilo_id))
     params = {"sporocilo": sporocilo}
     self.render_template("posamezno_sporocilo.html", params=params)
开发者ID:TomazLipuscek,项目名称:Prenos-na-bazo-Google-App-Engine-,代码行数:6,代码来源:main.py


注:本文中的models.Sporocilo.get_by_id方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。