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


Python Sporocilo.query方法代码示例

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


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

示例1: get

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

        vsa_sporocila = Sporocilo.query(Sporocilo.izbrisano == False).fetchsa_sporocila()

        params = {"sporocila": vsa_sporocila}

        return self.render_template("vsa_sprocila.html", params=params)
开发者ID:jO-Osko,项目名称:snit-edit-delete,代码行数:9,代码来源:main.py

示例2: get

# 需要导入模块: from models import Sporocilo [as 别名]
# 或者: from models.Sporocilo import query [as 别名]
    def get(self):
        vsa_sporocila = Sporocilo.query().order(Sporocilo.nastanek).fetch()

        view_vars = {
            "vsa_sporocila": vsa_sporocila,
        }

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

示例3: get

# 需要导入模块: from models import Sporocilo [as 别名]
# 或者: from models.Sporocilo import query [as 别名]
 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')
开发者ID:jpirih,项目名称:Homepage,代码行数:10,代码来源:handlers.py

示例4: post

# 需要导入模块: from models import Sporocilo [as 别名]
# 或者: from models.Sporocilo import query [as 别名]
    def post(self):
        search_query = self.request.get("search_parameter")
        seznam = Sporocilo.query(Sporocilo.izbrisan == False).fetch()
        logging.info(seznam)
        filtered_list = []

        for name in seznam:
            person_name = name.vnos
            if person_name.startswith(search_query):
                filtered_list.append(name)

        params = {"seznam": filtered_list}
        self.render_template("seznam_sporocil.html", params=params)
开发者ID:ZeroCool51,项目名称:smartninja,代码行数:15,代码来源:main.py

示例5: get

# 需要导入模块: from models import Sporocilo [as 别名]
# 或者: from models.Sporocilo import query [as 别名]
    def get(self):
        messages = {"listOfMessages": []}
        dbMessages = Sporocilo.query(Sporocilo.izbrisan == False).fetch()
        for message in dbMessages:
            date = message.nastanek
            logging.info(date.year)
            jsonMessage = {
                "content": message.vnos,
                "key": message.key.id(),
                "date": {"month": message.nastanek.month, "day": message.nastanek.day, "year": message.nastanek.year},
            }
            messages["listOfMessages"].append(jsonMessage)

        jsonMessages = json.dumps(messages, ensure_ascii=False).encode("utf8")
        self.write(jsonMessages)
开发者ID:ZeroCool51,项目名称:smartninja,代码行数:17,代码来源:main.py

示例6: get

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

示例7: get

# 需要导入模块: from models import Sporocilo [as 别名]
# 或者: from models.Sporocilo import query [as 别名]
    def get(self):
        seznam = Sporocilo.query(Sporocilo.izbrisan == False).fetch()

        params = {"seznam": seznam}

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

示例8: get

# 需要导入模块: from models import Sporocilo [as 别名]
# 或者: from models.Sporocilo import query [as 别名]
    def get(self):
        sporocila = Sporocilo.query(Sporocilo.izbrisano == False).order(-Sporocilo.created).fetch()

        params = {"sporocila": sporocila}

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

示例9: get

# 需要导入模块: from models import Sporocilo [as 别名]
# 或者: from models.Sporocilo import query [as 别名]
 def get(self):
     user = users.get_current_user()
     seznam_prejeto = Sporocilo.query(Sporocilo.Naslovnik == user.email()).fetch()
     params = {"seznam_prejeto": seznam_prejeto, "user": user}
     self.render_template("Prejeto.html", params=params)
开发者ID:marusa15,项目名称:Bmail,代码行数:7,代码来源:main.py

示例10: get

# 需要导入模块: from models import Sporocilo [as 别名]
# 或者: from models.Sporocilo import query [as 别名]
    def get(self):
        uporabnik = str(users.get_current_user())
        sporocilo = Sporocilo.query(Sporocilo.from_user)
        params = {"sporocilo": sporocilo}

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

示例11: get

# 需要导入模块: from models import Sporocilo [as 别名]
# 或者: from models.Sporocilo import query [as 别名]
    def get(self):
        all_messages = Sporocilo.query().order(Sporocilo.nastanek).fetch()

        params = {"all_messages": all_messages}

        return self.render_template("seznam_sporocil.html", params=params)
开发者ID:brishewatts,项目名称:GuestBOOK,代码行数:8,代码来源:main.py


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