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


Python QueryHelper.get_version_info_by_category方法代码示例

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


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

示例1: get

# 需要导入模块: from helpers.queryhelper import QueryHelper [as 别名]
# 或者: from helpers.queryhelper.QueryHelper import get_version_info_by_category [as 别名]
 def get(self):
     category = int(self.get_argument('category', 2))
     if category == 2:  # ydws
         #version_info = get_version_info('android')
         download_info = get_download_count(category, self.db)
         version_info = QueryHelper.get_version_info_by_category(
             UWEB.APK_TYPE.YDWS, self.db)
         update_download_count(category, self.db)
         self.render('android_weixin.html',
                     versioncode=version_info.versioncode,
                     versionname=version_info.versionname,
                     versioninfo=version_info.versioninfo,
                     updatetime=version_info.updatetime,
                     filesize=version_info.filesize,
                     count=download_info.count)
     elif category == 3:  # ydwq_monitor
         version_info = QueryHelper.get_version_info_by_category(
             UWEB.APK_TYPE.YDWQ_MONITOR, self.db)
         url = "/static/apk/" + version_info['filename']
         self.redirect(url)
     elif category == 4:  # ydwq_monitored
         version_info = QueryHelper.get_version_info_by_category(
             UWEB.APK_TYPE.YDWQ_MONITORED, self.db)
         url = "/static/apk/" + version_info['filename']
         self.redirect(url)
     elif category == 5:  # ydws_anjietong
         version_info = QueryHelper.get_version_info_by_category(
             UWEB.APK_TYPE.YDWS_ANJIETONG, self.db)
         url = "/static/apk/" + version_info['filename']
         self.redirect(url)
开发者ID:jcsy521,项目名称:ydws,代码行数:32,代码来源:download.py

示例2: get

# 需要导入模块: from helpers.queryhelper import QueryHelper [as 别名]
# 或者: from helpers.queryhelper.QueryHelper import get_version_info_by_category [as 别名]
    def get(self):
        status = ErrorCode.SUCCESS
        try:
            category = int(self.get_argument('category', UWEB.APK_TYPE.YDWS))
            if category == UWEB.APK_TYPE.YDWS:  # 1
                #version_info = get_version_info("android")
                version_info = QueryHelper.get_version_info_by_category(
                    category, self.db)
            elif category == UWEB.APK_TYPE.YDWQ_MONITOR:  # 2
                version_info = QueryHelper.get_version_info_by_category(
                    category, self.db)
            elif category == UWEB.APK_TYPE.YDWQ_MONITORED:  # 3
                version_info = QueryHelper.get_version_info_by_category(
                    category, self.db)
            elif category == UWEB.APK_TYPE.YDWS_ANJIETONG:  # 4
                version_info = QueryHelper.get_version_info_by_category(
                    category, self.db)
            else:
                logging.info("[UWEB] Invalid category: %s",
                             category)

            self.write_ret(status,
                           dict_=DotDict(version_info=version_info))
        except Exception as e:
            logging.exception(
                "[UWEB] Android check update failed. Exception: %s", e.args)
            status = ErrorCode.SERVER_BUSY
            self.write_ret(status)
开发者ID:jcsy521,项目名称:ydws,代码行数:30,代码来源:checkupdate.py

示例3: get

# 需要导入模块: from helpers.queryhelper import QueryHelper [as 别名]
# 或者: from helpers.queryhelper.QueryHelper import get_version_info_by_category [as 别名]
    def get(self):
        """Jump to android.html."""
        category = self.get_argument('category', '2')
        #version_info = get_version_info('android')
        version_info = QueryHelper.get_version_info_by_category(
            UWEB.APK_TYPE.YDWS, self.db)
        download_info = get_download_count(category, self.db)

        self.render('android.html',
                    versioncode=version_info.versioncode,
                    versionname=version_info.versionname,
                    versioninfo=version_info.versioninfo,
                    updatetime=version_info.updatetime,
                    filesize=version_info.filesize,
                    count=download_info.count if download_info else 0)
开发者ID:jcsy521,项目名称:ydws,代码行数:17,代码来源:instruction.py


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