本文整理汇总了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
示例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()
示例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
示例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
示例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
示例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)
示例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)
示例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)
示例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
示例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
示例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)
示例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)
示例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)
示例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
示例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