if User.query.get(5):
from flask_login import login_required, current_user
@app.route('/secret_page')
@login_required
def secret_page():
if current_user.get_id() == 5:
return render_template('test.html', title='Страница',)
return redirect(url_for('index'))