diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2014-05-16 07:42:40 +0200 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2014-05-16 07:42:40 +0200 |
commit | 5ee2dd0eece7a7360dfb6bef217dc7eaeeaad9fc (patch) | |
tree | dbdd8ceba45f9998a67e41bde8b055715692e87a | |
parent | Updated dashboard template (minor changes). (diff) | |
download | newspipe-5ee2dd0eece7a7360dfb6bef217dc7eaeeaad9fc.tar.gz newspipe-5ee2dd0eece7a7360dfb6bef217dc7eaeeaad9fc.tar.bz2 newspipe-5ee2dd0eece7a7360dfb6bef217dc7eaeeaad9fc.zip |
Login and signup for already users only.
-rw-r--r-- | pyaggr3g470r/views.py | 6 |
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(): |