if (username==aname or username==aemail) and userpass==apass:
session['user'] = username
print("hello")
poste = classic.Posts.query.filter_by(user_id="1").all()
posts = classic.Posts.query.all()
return render_template('dashboard.html', params=params, posts=posts, poste=poste)
#if username == params['admin_user'] and userpass == params['admin_password']:
# session['user'] = username
# poste = classic.Posts.query.filter_by(user_id="1").all()
# posts = classic.Posts.query.all()
#return render_template('dashboard.html', params=params, posts=posts, poste=poste)
while using first section i am not able to create session as using name from database but while using 2nd section able to create session as using name from config. json file. i am doing in python flask