本文整理汇总了Python中users.User.phone方法的典型用法代码示例。如果您正苦于以下问题:Python User.phone方法的具体用法?Python User.phone怎么用?Python User.phone使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类users.User
的用法示例。
在下文中一共展示了User.phone方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: sync_from_server
# 需要导入模块: from users import User [as 别名]
# 或者: from users.User import phone [as 别名]
#.........这里部分代码省略.........
color.color_id = colors['id']
color.company_id = colors['company_id']
color.color = colors['color']
color.name = colors['name']
color.ordered = colors['ordered']
color.status = colors['status']
color.deleted_at = colors['deleted_at']
color.created_at = colors['created_at']
color.updated_at = colors['updated_at']
# check to see if color_id already exists and update
count_color = color.where({'color_id': color.color_id})
if len(count_color) > 0 or color.deleted_at:
for data in count_color:
color.id = data['id']
if color.deleted_at:
color.delete()
else:
color.update_special()
else:
color.add_special()
color.close_connection()
if 'companies' in updates:
for companies in updates['companies']:
company = Company()
company.company_id = companies['id']
company.name = companies['name']
company.street = companies['street']
company.city = companies['city']
company.state = companies['state']
company.zip = companies['zip']
company.email = companies['email']
company.phone = companies['phone']
company.store_hours = companies['store_hours']
company.turn_around = companies['turn_around']
company.api_token = companies['api_token']
company.payment_gateway_id = companies['payment_gateway_id']
company.payment_api_login = companies['payment_api_login']
company.deleted_at = companies['deleted_at']
company.created_at = companies['created_at']
company.updated_at = companies['updated_at']
company.server_at = now
count_company = company.where({'company_id': company.company_id})
if len(count_company) > 0 or company.deleted_at:
for data in count_company:
company.id = data['id']
if company.deleted_at:
company.delete()
else:
company.update_special()
else:
company.add_special()
company.close_connection()
if 'credits' in updates:
for credits in updates['credits']:
credit = Credit()
credit.credit_id = credits['id']
credit.employee_id = credits['employee_id']
credit.customer_id = credits['customer_id']
credit.amount = credits['amount']
credit.reason = credits['reason']
credit.status = credits['status']
credit.deleted_at = credits['deleted_at']
credit.created_at = credits['created_at']