diff options
Diffstat (limited to 'pyaggr3g470r/views.py')
-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(): |