techwithtim / Flask-Web-App-Tutorial

Code for the note storing flask web app made during a YouTube video.
932 stars 1.03k forks source link

im having a problem where auth.py routes are not showing up when i put them in my url. #62

Open RonKat2008 opened 2 years ago

RonKat2008 commented 2 years ago

from flask import Blueprint

auth = Blueprint('auth', name)

@auth.route('/login') def login(): return "< p >Login< /p >"

@auth.route('/logout') def logout(): return "< p >Logout < /p >"

@auth.route('/sign-up') def sign_up(): return "< p >Sign Up< /p >"

bibinthomas123 commented 2 years ago

the second parameter in the blueprint name is a not valid input try __name__

auth = Blueprint('auth', __name__)

@auth.route('/login', methods=['GET', 'POST'])
def login():
    if request.method == 'POST':
        ......