diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2014-11-20 07:08:48 +0100 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2014-11-20 07:08:48 +0100 |
commit | b75cb16df742a9f01342c86d35152cde728f2f74 (patch) | |
tree | d18efde1b10d02d6c8728d2c1ef7a8ce1a9c04a2 /pyaggr3g470r/views.py | |
parent | Renamed function send_email to send_smtp. (diff) | |
download | newspipe-b75cb16df742a9f01342c86d35152cde728f2f74.tar.gz newspipe-b75cb16df742a9f01342c86d35152cde728f2f74.tar.bz2 newspipe-b75cb16df742a9f01342c86d35152cde728f2f74.zip |
Notifications functions and functions to send emails are now in separated files.
Diffstat (limited to 'pyaggr3g470r/views.py')
-rw-r--r-- | pyaggr3g470r/views.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pyaggr3g470r/views.py b/pyaggr3g470r/views.py index 9a2b2811..ad0cc914 100644 --- a/pyaggr3g470r/views.py +++ b/pyaggr3g470r/views.py @@ -42,7 +42,7 @@ from sqlalchemy.exc import IntegrityError from werkzeug import generate_password_hash import conf -from pyaggr3g470r import utils, emails, export +from pyaggr3g470r import utils, notifications, export from pyaggr3g470r import app, db, allowed_file, babel from pyaggr3g470r.models import User, Feed, Article, Role from pyaggr3g470r.decorators import feed_access_required @@ -206,7 +206,7 @@ def signup(): # Send the confirmation email try: - emails.new_account_notification(user) + notifications.new_account_notification(user) except Exception as e: flash(gettext('Problem while sending activation email') + ': ' + str(e), 'danger') return redirect(url_for('home')) @@ -782,7 +782,7 @@ def recover(): # Send the confirmation email try: - emails.new_password_notification(user, password) + notifications.new_password_notification(user, password) flash(gettext('New password sent to your address.'), 'success') except Exception as e: flash(gettext('Problem while sending your new password.') + ': ' + str(e), 'danger') @@ -808,7 +808,7 @@ def dashboard(): if request.method == 'POST': if form.validate(): try: - emails.information_message(form.subject.data, form.message.data) + notifications.information_message(form.subject.data, form.message.data) except Exception as e: flash(gettext('Problem while sending email') + ': ' + str(e), 'danger') @@ -904,7 +904,7 @@ def disable_user(user_id=None): # Send the confirmation email try: - emails.new_account_activation(user) + notifications.new_account_activation(user) user.activation_key = "" flash(gettext('Account of the user') + ' ' + user.nickname + ' ' + gettext('successfully activated.'), 'success') except Exception as e: |