login improvements
This commit is contained in:
@@ -27,9 +27,9 @@ def init_routes(main_bp):
|
||||
|
||||
@main_bp.route('/')
|
||||
def home():
|
||||
if current_user.is_authenticated:
|
||||
return redirect(url_for('main.dashboard'))
|
||||
return render_template('home.html')
|
||||
if not current_user.is_authenticated:
|
||||
return redirect(url_for('auth.login'))
|
||||
return redirect(url_for('main.dashboard'))
|
||||
|
||||
@main_bp.route('/dashboard')
|
||||
@login_required
|
||||
|
||||
Reference in New Issue
Block a user