def store_user(): username = request.form['username'] password = request.form['password'] db_util.user_signup(username,password) session["email"] = username return redirect('/transfer') return render_template('entry.html',username=username,password=password)
def user_signup(): user_details = request.get_json() firstName = user_details.get('firstName') lastName = user_details.get('lastName') emailId = user_details.get('emailId') password = user_details.get('password') print "User Signup" user_id = db_util.user_signup(firstName, lastName, emailId, password) print user_id #return user_id if user_id != "0": links = [ {'url': '/users/login/', 'method': 'POST'} ] js = {'Links': links, 'UserID': user_id} resp = Response(json.dumps(js, indent=2), status=201, mimetype='application/json') return resp
def user_signup(): user_details = request.get_json() fname = user_details.get('fname') lname = user_details.get('lname') emailID = user_details.get('email') passwd = user_details.get('password') print "User Signup" new_user = User(firstName=fname, lastName=lname, email=emailID, password=passwd, user_id=incr_user_count(), boards="0") user_id = db_util.user_signup(new_user) print user_id #return user_id if (user_id != "0"): links = {'links': [ {'url': '/user/login', 'method': 'POST'}, ],'userID' : user_id} js = json.dumps(links) resp = Response(js, status=201, mimetype='application/json') resp.headers['Link'] = 'http://127.0.0.1:5000' return resp
def process_new_user(): email = request.form['email'] password = request.form['password'] db_util.user_signup(email,password) session["email"] = email return redirect('/transfer')
def process_new_user(): email = request.form['email'] password = request.form['password'] db_util.user_signup(email, password) session["email"] = email return redirect('/transfer')