示例#1
0
def initialize():
    try:
        user = input("请输入初始化管理员账户:")
        pwd = input("请输入初始化管理员密码:")
        obj = Admin(user, pwd)
        obj.save()
        return True
    except Exception as e:
        print(e)
示例#2
0
def initialize():
    try:
        user = input('请输入初始化用户名:')
        pwd = getpass.getpass('请输入初始化密码:')
        obj = Admin(user, pwd)
        obj.save()
        return True
    except Exception as e:
        print(e)
def initialize():
    try:
        user = input("请输入初始化用户名: ").strip()
        pwd = getpass.getpass("请输入初始化密码:").strip()
        obj = Admin(user, pwd)
        obj.save()
        return True
    except Exception as e:
        print(e)
示例#4
0
def initialize():
    try:
        username = input("请输入用户名称:")
        password = input("请输入密码:")
        obj = Admin(username, password)
        obj.save()
        return True
    except Exception as e:
        print(e)
示例#5
0
def initialize():
    try:
        user = input('请输入初始化用户名:')
        pwd = input('请输入初始化密码:')
        if len(user) > 0 and len(pwd) > 0:
            obj = Admin(user, pwd)
            obj.save()
            return True
        else:
            print('用户名或密码不能为空')
            return False
    except Exception as e:
        print(e)