Solution
from flask import flash
@app.route('/registrierung', methods=['GET', 'POST'])
@app.route('/Registrierung', methods=['GET', 'POST'])
def registration_page(): # put application's code here
registration_form = RegistrationForm()
# ---------------------------------------------------
if registration_form.validate_on_submit():
print(registration_form.is_submitted())
# ----------------- Database Stuff -------------
flash(f'Account was created!', 'success')
return redirect(url_for('login_page'))
return render_template("registrierung.html", img_var_path=get_background_img_path(), registration_form=registration_form)
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
{% for category, message in messages %}
{{ message }}
{% endfor %}
{% endif %}
{% endwith %}