本文整理汇总了Python中module.webui.PYLOAD.updateAccount方法的典型用法代码示例。如果您正苦于以下问题:Python PYLOAD.updateAccount方法的具体用法?Python PYLOAD.updateAccount怎么用?Python PYLOAD.updateAccount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类module.webui.PYLOAD
的用法示例。
在下文中一共展示了PYLOAD.updateAccount方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: update_accounts
# 需要导入模块: from module.webui import PYLOAD [as 别名]
# 或者: from module.webui.PYLOAD import updateAccount [as 别名]
def update_accounts():
deleted = [] #dont update deleted accs or they will be created again
for name, value in request.POST.iteritems():
value = value.strip()
if not value: continue
tmp, user = name.split(";")
plugin, action = tmp.split("|")
if (plugin, user) in deleted: continue
if action == "password":
PYLOAD.updateAccount(plugin, user, value)
elif action == "time" and "-" in value:
PYLOAD.updateAccount(plugin, user, options={"time": [value]})
elif action == "limitdl" and value.isdigit():
PYLOAD.updateAccount(plugin, user, options={"limitDL": [value]})
elif action == "delete":
deleted.append((plugin,user))
PYLOAD.removeAccount(plugin, user)
示例2: add_account
# 需要导入模块: from module.webui import PYLOAD [as 别名]
# 或者: from module.webui.PYLOAD import updateAccount [as 别名]
def add_account():
login = request.POST["account_login"]
password = request.POST["account_password"]
type = request.POST["account_type"]
PYLOAD.updateAccount(type, login, password)