diff --git a/app.py b/app.py index 9377bf0..4fc765b 100644 --- a/app.py +++ b/app.py @@ -99,12 +99,10 @@ class User(db.Model): id = db.Column(db.Integer, primary_key=True) username = db.Column(db.String(100)) - password = db.Column(db.String(128)) authenticated = db.Column(db.Boolean, default=False) - def __init__(self, username, password): + def __init__(self, username): self.username = username - self.password = password @staticmethod def try_login(username, password): @@ -199,14 +197,10 @@ def login(): return redirect(url_for('index')) form = LoginForm(request.form) - print(form) - print(request.method) if request.method == 'POST' and form.validate(): username = request.form.get('username') password = request.form.get('password') - print(username) - print(password) try: User.try_login(username, password) @@ -218,9 +212,8 @@ def login(): user = User.query.filter(User.username == username).first() - print(user) if user is None: - user = User(username, password) + user = User(username) db.session.add(user) user.authenticated = True db.session.commit()