def register(): global new_u_id, this_u_id, admin logging.info("Register request user response\n") print("1 - Register") x = input("Username: ") z = getpass.getpass('Password:'******'y': admin = True main_menu()
def register(): global new_u_id, this_u_id, admin f.writing("Register request user response\n") print("1 - Register") x = input("user name: ") z = input("password: "******"email: ") w = input("Are you an administrator? (y/n)") f.writing("Response: ") f.writing("user name: ") f.writing(x) f.writing(" password: "******" email: ") f.writing(y) f.writing("Are you administrator? ") f.writing(w) f.writing("\n") user.insert(new_u_id, x, z, y) this_u_id = new_u_id # print ("this u id is ", this_u_id) new_u_id += 1 if w == 'y': admin = True main_menu()
def index(): os.system('cls') username = input('请输入用户名:') if not user.is_in_csv(username): password = input('请输入密码:') user.insert(username, password) print(f'恭喜{username}注册成功!!') else: print('该用户名已存在') index() time.sleep(1.3) os.system('cls') play()
def register(): global new_u_id, this_u_id, admin print("1 - Register") x = input("user name: ") z = input("password: "******"email: ") w = input("Are you an administrator? (y/n)") user.insert(new_u_id, x, z, y) this_u_id = new_u_id # print ("this u id is ", this_u_id) new_u_id += 1 if w == 'y': admin = True main_menu()
def signup(): if request.method == 'GET': # Si entré por "GET" es porque acabo de cargar la página try: return render_template('signup.html') except: return jsonify({'trace': traceback.format_exc()}) if request.method == 'POST': name = str(request.form.get('name')) email = request.form.get('email') password = request.form.get('password') user_id = user.insert(name, email, password) if user_id is not None: return render_template('login.html') else: # Datos ingresados incorrectos return render_template('signup.html')