INQ-31 splited login

This commit is contained in:
DarkPete 2019-01-16 12:27:19 +01:00
parent 77c3c9e948
commit d423a19bfc

3
App.py
View File

@ -25,6 +25,9 @@ def home():
if not session.get('logged_in'): if not session.get('logged_in'):
return render_template('login.html') return render_template('login.html')
else: else:
if session['user_type'] == 'lecturer':
return redirect('/lecturer')
elif session['user_type'] == 'student':
return redirect('/courses') return redirect('/courses')
@app.route('/student',methods=['GET', 'POST']) @app.route('/student',methods=['GET', 'POST'])