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


Python Objects.get_object_info方法代码示例

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


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

示例1: get_user_info

# 需要导入模块: from objects import Objects [as 别名]
# 或者: from objects.Objects import get_object_info [as 别名]
 def get_user_info(user_extension):
     result = dict()
     result = Objects.get_object_info(user_extension)
     temp = Objects.get_object_info(user_extension.user)
     temp["user_id"] = temp["id"]
     result["userextension_id"] = result["id"]
     result.update(temp)
     return result
开发者ID:appleface2050,项目名称:WorkCode_Bakup,代码行数:10,代码来源:users.py

示例2: get_info

# 需要导入模块: from objects import Objects [as 别名]
# 或者: from objects.Objects import get_object_info [as 别名]
 def get_info(red_envelope):
     try:
         result = Objects.get_object_info(red_envelope)
         return result
     except Exception as ex:
         Logs.print_current_function_name_and_line_number(ex)
         return dict()
开发者ID:appleface2050,项目名称:WorkCode_Bakup,代码行数:9,代码来源:redenvelopes.py

示例3: get_big_categories

# 需要导入模块: from objects import Objects [as 别名]
# 或者: from objects.Objects import get_object_info [as 别名]
    def get_big_categories():
        category_list = list()
        categories = ShopCategory.objects.filter(parent_id=1)
        for c in categories:
            temp = Objects.get_object_info(c)
            category_list.append(temp)

        return category_list
开发者ID:appleface2050,项目名称:WorkCode_Bakup,代码行数:10,代码来源:shop_categories.py

示例4: get_category_info

# 需要导入模块: from objects import Objects [as 别名]
# 或者: from objects.Objects import get_object_info [as 别名]
    def get_category_info(category):
        result = Objects.get_object_info(category)
        owners = list()
        for owner in category.owners.all():
            user_extension = Users.get_user_extension(owner.username)
            if user_extension:
                owners.append(Users.get_user_info(user_extension))

        result["owners"] = owners
        return result
开发者ID:appleface2050,项目名称:WorkCode_Bakup,代码行数:12,代码来源:forums.py

示例5: get_info

# 需要导入模块: from objects import Objects [as 别名]
# 或者: from objects.Objects import get_object_info [as 别名]
    def get_info(detector):

        result = Objects.get_object_info(detector)
        result_weather = None
        try:
            relation = DetectorRelation.objects.exclude(state=False).get(mac_address=detector.mac_address)
            result["shop_address"] = relation.address
            # Logs.print_log("shop_address", relation.address)
            # if relation.shop:
            #     if relation.shop.dianping_business_id:
            #         result["shop_address"] = relation.shop.dianping_city + relation.shop.dianping_address
            #     else:
            #         if relation.shop.address:
            #             result["shop_address"] = relation.shop.address.detail_address
            #         else:
            #             result["shop_address"] = None
            # Logs.print_log("relation.city", relation.city)
            if relation.city:
                weather = Weathers.get_weather_from_db(relation.city)
                result["address"] = relation.address

                if not weather or Weathers.is_weather_in_db_timeout(weather):
                    weather = Weathers.get_weather_from_heweather(relation.city)
                    # Logs.print_log("weather", weather)
                    Weathers.create_weather(weather)
                    result_weather = weather
                else:
                    result_weather = Weathers.get_weather_info(weather)
        except Exception as ex:
            Logs.print_current_function_name_and_line_number(ex)
            result_weather = None
        if result_weather:
            for (key, value) in result_weather.items():
                result["weather_" + key] = value

        return result
开发者ID:appleface2050,项目名称:WorkCode_Bakup,代码行数:38,代码来源:detectors.py

示例6: get_info

# 需要导入模块: from objects import Objects [as 别名]
# 或者: from objects.Objects import get_object_info [as 别名]
 def get_info(label):
     return Objects.get_object_info(label)
开发者ID:appleface2050,项目名称:WorkCode_Bakup,代码行数:4,代码来源:forum_labels.py

示例7: get_info

# 需要导入模块: from objects import Objects [as 别名]
# 或者: from objects.Objects import get_object_info [as 别名]
 def get_info(comment):
     return Objects.get_object_info(comment)
开发者ID:appleface2050,项目名称:WorkCode_Bakup,代码行数:4,代码来源:comments.py

示例8: get_info

# 需要导入模块: from objects import Objects [as 别名]
# 或者: from objects.Objects import get_object_info [as 别名]
 def get_info(address):
     return Objects.get_object_info(address)
开发者ID:appleface2050,项目名称:WorkCode_Bakup,代码行数:4,代码来源:addresses.py

示例9: get_info

# 需要导入模块: from objects import Objects [as 别名]
# 或者: from objects.Objects import get_object_info [as 别名]
 def get_info(publish):
     result = dict()
     result = Objects.get_object_info(publish)
     return result
开发者ID:appleface2050,项目名称:WorkCode_Bakup,代码行数:6,代码来源:publishes.py

示例10: get_info

# 需要导入模块: from objects import Objects [as 别名]
# 或者: from objects.Objects import get_object_info [as 别名]
 def get_info(game):
     result = Objects.get_object_info(game)
     result["ranking"] = Games.get_ranking(game.score)
     return result
开发者ID:appleface2050,项目名称:WorkCode_Bakup,代码行数:6,代码来源:games.py

示例11: get_one

# 需要导入模块: from objects import Objects [as 别名]
# 或者: from objects.Objects import get_object_info [as 别名]
 def get_one(detector):
     return Objects.get_object_info(detector)
开发者ID:appleface2050,项目名称:WorkCode_Bakup,代码行数:4,代码来源:detectors.py

示例12: get_detector_relation_info

# 需要导入模块: from objects import Objects [as 别名]
# 或者: from objects.Objects import get_object_info [as 别名]
 def get_detector_relation_info(detector_relation):
     return Objects.get_object_info(detector_relation)
开发者ID:appleface2050,项目名称:WorkCode_Bakup,代码行数:4,代码来源:detectors.py

示例13: get_info

# 需要导入模块: from objects import Objects [as 别名]
# 或者: from objects.Objects import get_object_info [as 别名]
 def get_info(article):
     return Objects.get_object_info(article)
开发者ID:appleface2050,项目名称:WorkCode_Bakup,代码行数:4,代码来源:forum_article.py

示例14: get_weather_info

# 需要导入模块: from objects import Objects [as 别名]
# 或者: from objects.Objects import get_object_info [as 别名]
 def get_weather_info(weather):
     try:
         return Objects.get_object_info(weather)
     except Exception as ex:
         Logs.print_current_function_name_and_line_number(ex)
         return None
开发者ID:appleface2050,项目名称:WorkCode_Bakup,代码行数:8,代码来源:weathers.py

示例15: get_shop_info

# 需要导入模块: from objects import Objects [as 别名]
# 或者: from objects.Objects import get_object_info [as 别名]
 def get_shop_info(shop):
     result = Objects.get_object_info(shop)
     return result
开发者ID:appleface2050,项目名称:WorkCode_Bakup,代码行数:5,代码来源:shops.py


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