aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r
diff options
context:
space:
mode:
authorFrançois Schmidts <francois.schmidts@gmail.com>2015-04-24 11:29:38 +0200
committerFrançois Schmidts <francois.schmidts@gmail.com>2015-05-13 15:46:40 +0200
commit09c7b401ec8c4de700ab37af51bad5b414ee87b0 (patch)
tree1ed25eb96e457b45fa6bc1ff2935dca9326354f1 /pyaggr3g470r
parentThe list of inactive feeds is now sorted. (diff)
downloadnewspipe-09c7b401ec8c4de700ab37af51bad5b414ee87b0.tar.gz
newspipe-09c7b401ec8c4de700ab37af51bad5b414ee87b0.tar.bz2
newspipe-09c7b401ec8c4de700ab37af51bad5b414ee87b0.zip
pep8
Diffstat (limited to 'pyaggr3g470r')
-rw-r--r--pyaggr3g470r/views/views.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/pyaggr3g470r/views/views.py b/pyaggr3g470r/views/views.py
index 1b834d0e..3abc76df 100644
--- a/pyaggr3g470r/views/views.py
+++ b/pyaggr3g470r/views/views.py
@@ -169,7 +169,6 @@ def login():
session['email'] = form.email.data
identity_changed.send(current_app._get_current_object(),
identity=Identity(user.id))
- flash(gettext("Logged in successfully."), 'success')
return redirect(url_for('home'))
return render_template('login.html', form=form)
@@ -190,7 +189,8 @@ def logout():
session.pop(key, None)
# Tell Flask-Principal the user is anonymous
- identity_changed.send(current_app._get_current_object(), identity=AnonymousIdentity())
+ identity_changed.send(current_app._get_current_object(),
+ identity=AnonymousIdentity())
flash(gettext("Logged out successfully."), 'success')
return redirect(url_for('login'))
@@ -224,8 +224,9 @@ def signup():
# Send the confirmation email
try:
notifications.new_account_notification(user)
- except Exception as e:
- flash(gettext('Problem while sending activation email') + ': ' + str(e), 'danger')
+ except Exception as error:
+ flash(gettext('Problem while sending activation email: %(error)s',
+ error=error), 'danger')
return redirect(url_for('home'))
flash(gettext('Your account has been created. '
@@ -286,9 +287,9 @@ def render_home(filters=None, head_titles=None,
if page_to_render == 'search':
kwargs['query'] = request.args.get('query', '')
kwargs['search_title'] = request.args.get('search_title', 'off')
- kwargs['search_content'] = request.args.get('search_content', 'off')
- if kwargs['search_title']=='off' and \
- kwargs['search_content']=='off':
+ kwargs['search_content'] = request.args.get(
+ 'search_content', 'off')
+ if kwargs['search_title'] == kwargs['search_content'] == 'off':
kwargs['search_title'] = 'on'
return url_for(page_to_render, filter_=filter_, sort_=sort_,
limit=limit, feed_id=feed_id, **kwargs)
bgstack15