mirror of
				https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
				synced 2025-11-03 20:02:47 +00:00 
			
		
		
		
	Make the about page the index page.
This commit is contained in:
		@@ -18,7 +18,7 @@ def login():
 | 
			
		||||
            login_user(user, form.remember_me.data)
 | 
			
		||||
            next = request.args.get('next')
 | 
			
		||||
            if next is None or not next.startswith('/'):
 | 
			
		||||
                next = url_for('main.index')
 | 
			
		||||
                next = url_for('main.dashboard')
 | 
			
		||||
            return redirect(next)
 | 
			
		||||
        flash('Invalid username or password.')
 | 
			
		||||
    return render_template('auth/login.html.j2', form=form, title='Log in')
 | 
			
		||||
@@ -35,7 +35,7 @@ def logout():
 | 
			
		||||
@auth.route('/register', methods=['GET', 'POST'])
 | 
			
		||||
def register():
 | 
			
		||||
    if not current_user.is_anonymous:
 | 
			
		||||
        return redirect(url_for('main.index'))
 | 
			
		||||
        return redirect(url_for('main.dashboard'))
 | 
			
		||||
    form = RegistrationForm()
 | 
			
		||||
    if form.validate_on_submit():
 | 
			
		||||
        user = User(email=form.email.data.lower(),
 | 
			
		||||
@@ -61,7 +61,7 @@ def confirm(token):
 | 
			
		||||
        flash('You have confirmed your account. Thanks!')
 | 
			
		||||
    else:
 | 
			
		||||
        flash('The confirmation link is invalid or has expired.')
 | 
			
		||||
    return redirect(url_for('main.index'))
 | 
			
		||||
    return redirect(url_for('main.dashboard'))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@auth.before_app_request
 | 
			
		||||
@@ -91,13 +91,13 @@ def resend_confirmation():
 | 
			
		||||
    send_email(current_user.email, 'Confirm Your Account', 'auth/email/confirm',
 | 
			
		||||
               user=current_user, token=token)
 | 
			
		||||
    flash('A new confirmation email has benn sent to you by email.')
 | 
			
		||||
    return redirect(url_for('main.index'))
 | 
			
		||||
    return redirect(url_for('main.dashboard'))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@auth.route('/reset', methods=['GET', 'POST'])
 | 
			
		||||
def password_reset_request():
 | 
			
		||||
    if not current_user.is_anonymous:
 | 
			
		||||
        return redirect(url_for('main.index'))
 | 
			
		||||
        return redirect(url_for('main.dashboard'))
 | 
			
		||||
    form = PasswordResetRequestForm()
 | 
			
		||||
    if form.validate_on_submit():
 | 
			
		||||
        user = User.query.filter_by(email=form.email.data.lower()).first()
 | 
			
		||||
@@ -116,7 +116,7 @@ def password_reset_request():
 | 
			
		||||
@auth.route('/reset/<token>', methods=['GET', 'POST'])
 | 
			
		||||
def password_reset(token):
 | 
			
		||||
    if not current_user.is_anonymous:
 | 
			
		||||
        return redirect(url_for('main.index'))
 | 
			
		||||
        return redirect(url_for('main.dashboard'))
 | 
			
		||||
    form = PasswordResetForm()
 | 
			
		||||
    if form.validate_on_submit():
 | 
			
		||||
        if User.reset_password(token, form.password.data):
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user