-
-
Save Kd-Here/6510508c3cd96a339cfdc2423949188a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Blueprint,render_template,request | |
auth = Blueprint('auth',__name__) | |
@auth.route('/login',methods=['GET','POST']) | |
def login(): | |
data = request.form | |
print(data) | |
return render_template('login.html',data_from_backend='testing data from backend') | |
@auth.route('/sign-up',methods=['GET','POST']) | |
def singin(): | |
if request.method == "POST": | |
email = request.form.get('email') | |
firstName = request.form.get('firstName') | |
password1 = request.form.get('password1') | |
password2 = request.form.get('password2') | |
if len(email) < 4: | |
pass | |
elif len(firstName) < 2: | |
pass | |
elif password1 != password2: | |
pass | |
elif len(password1) < 7: | |
pass | |
else: | |
# add to datbase | |
pass | |
else: | |
return render_template('sign_up.html') | |
@auth.route('/logout') | |
def logout(): | |
return "<h2>Logout</h2>" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment