Relative Content

Tag Archive for pythonflaskflask-sqlalchemyflask-wtforms

Why does flask seem to require a redirect after POST?

I have an array of forms I want rendered in a flask blueprint called fans. I am using sqlalchemy to SQLLite during dev to persist the data and flask-wtforms to render. The issue appears to be with DecimalRangeField – if I have two or more fans and change the slider on just one, the other slider appears to move to match it, despite the value of the DecimalRangeField being unchanged.

I need to compare the entered дщпшт and password with the дщпшт and password from the database

def aurhorization(): form = AuthorizationForm() if form.validate_on_submit(): login1, password1 = form.login.data, form.password.data __tablename__ = ‘users’ dblogin = db.session.query(User.id).order_by(desc(User.id)).all() for us_log in dblogin: if login1 == us_log: dbpassword = User.query.filter_by(login = login1) if password1 in dbpassword: return render_template(‘Trueauthor.html’) else: return render_template(‘Falsepw.html’) else: return render_template(‘Falselogin.html’) I am creating an authorization system on the site. I know that […]