本文整理汇总了Python中models.Log.updated_col方法的典型用法代码示例。如果您正苦于以下问题:Python Log.updated_col方法的具体用法?Python Log.updated_col怎么用?Python Log.updated_col使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类models.Log
的用法示例。
在下文中一共展示了Log.updated_col方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: error_log
# 需要导入模块: from models import Log [as 别名]
# 或者: from models.Log import updated_col [as 别名]
def error_log(last_log, **params):
spreadsheetId = params["spreadsheetId"]
output_spreadsheet = params["output_spreadsheet"]
offset = params["offset"]
tab = params["tab"]
out = params["out"]
if last_log.status == "Error":
last_log.updated_row += 1
last_log.save()
else:
last_log = Log(from_sheet=spreadsheetId, to_sheet=output_spreadsheet, from_tab=tab, to_tab=out)
last_log.updated_range = '!A{}:M'.format(offset)
last_log.updated_row = 1
last_log.updated_col = 0
last_log.status = "Error"
last_log.save()
return last_log
示例2: success_log
# 需要导入模块: from models import Log [as 别名]
# 或者: from models.Log import updated_col [as 别名]
def success_log(last_log, **params):
spreadsheetId = params["spreadsheetId"]
output_spreadsheet = params["output_spreadsheet"]
tab = params["tab"]
out = params["out"]
body = params["body"]
if last_log.status == "Success":
last_log.updated_row += 1
last_log.save()
else:
last_log = Log(from_sheet=spreadsheetId, to_sheet=output_spreadsheet, from_tab=tab, to_tab=out)
last_log.updated_range = body["updatedRange"]
last_log.updated_row = body["updatedRows"]
last_log.updated_col = body["updatedColumns"]
last_log.status = "Success"
last_log.save()
return last_log