Skip to content

Commit

Permalink
Work on redirect.
Browse files Browse the repository at this point in the history
  • Loading branch information
teleyinex committed Dec 20, 2016
1 parent 9a1107a commit 9f633c4
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions pybossa/view/account.py
Expand Up @@ -39,7 +39,7 @@
import pybossa.model as model
from flask.ext.babel import gettext
from pybossa.core import signer, uploader, sentinel, newsletter
from pybossa.util import Pagination
from pybossa.util import Pagination, handle_content_type
from pybossa.util import get_user_signup_method
from pybossa.cache import users as cached_users
from pybossa.auth import ensure_authorized_to
Expand Down Expand Up @@ -124,10 +124,12 @@ def signin():
auth['facebook'] = True
if ('google' in current_app.blueprints): # pragma: no cover
auth['google'] = True
return render_template('account/signin.html',
title="Sign in",
form=form, auth=auth,
next=request.args.get('next'))
response = dict(template='account/signin.html',
title="Sign in",
form=form,
auth=auth,
next=request.args.get('next'))
return handle_content_type(response)
else:
# User already signed in, so redirect to home page
return redirect(url_for("home.home"))
Expand Down

0 comments on commit 9f633c4

Please sign in to comment.