aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2014-05-16 07:42:40 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2014-05-16 07:42:40 +0200
commit5ee2dd0eece7a7360dfb6bef217dc7eaeeaad9fc (patch)
treedbdd8ceba45f9998a67e41bde8b055715692e87a /pyaggr3g470r
parentUpdated dashboard template (minor changes). (diff)
downloadnewspipe-5ee2dd0eece7a7360dfb6bef217dc7eaeeaad9fc.tar.gz
newspipe-5ee2dd0eece7a7360dfb6bef217dc7eaeeaad9fc.tar.bz2
newspipe-5ee2dd0eece7a7360dfb6bef217dc7eaeeaad9fc.zip
Login and signup for already users only.
Diffstat (limited to 'pyaggr3g470r')
-rw-r--r--pyaggr3g470r/views.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/pyaggr3g470r/views.py b/pyaggr3g470r/views.py
index 8d214144..abc7a68a 100644
--- a/pyaggr3g470r/views.py
+++ b/pyaggr3g470r/views.py
@@ -137,6 +137,9 @@ def login():
"""
Log in view.
"""
+ if g.user is not None and g.user.is_authenticated():
+ return redirect(url_for('home'))
+
g.user = AnonymousUserMixin()
form = SigninForm()
@@ -173,6 +176,9 @@ def signup():
"""
Signup page.
"""
+ if g.user is not None and g.user.is_authenticated():
+ return redirect(url_for('home'))
+
form = SignupForm()
if form.validate_on_submit():
bgstack15