diff --git a/ennstatus/root/functions.py b/ennstatus/root/functions.py --- a/ennstatus/root/functions.py +++ b/ennstatus/root/functions.py @@ -1,4 +1,4 @@ -from flask import render_template, current_app +from flask import render_template, current_app, flash from flask_mail import Mail, Message @@ -25,6 +25,7 @@ def send_membership_mail(form): ) print(msg.body) mail.send(msg) + flash('Application successfully sended!', 'success') except KeyError: current_app.logger.error('Membership admin not found!') except AssertionError: diff --git a/ennstatus/root/views.py b/ennstatus/root/views.py --- a/ennstatus/root/views.py +++ b/ennstatus/root/views.py @@ -48,6 +48,7 @@ def membership(): current_app.logger.debug('Validating form') if form.validate_on_submit(): send_membership_mail(form) + return redirect(url_for('root.member')) return render_template('root/membership.html', form=form) diff --git a/ennstatus/templates/base.html b/ennstatus/templates/base.html --- a/ennstatus/templates/base.html +++ b/ennstatus/templates/base.html @@ -1,5 +1,7 @@ {% extends "bootstrap/base.html" %} +{% import 'macros.html' as base_macros with context %} + {% block title %} Frënn vun der Ënn - {{ title }} {% endblock %} @@ -116,6 +118,15 @@ {% endblock %}