diff --git a/decide/authentication/templates/login.html b/decide/authentication/templates/login.html index a357f1f341..c7f908a6dd 100644 --- a/decide/authentication/templates/login.html +++ b/decide/authentication/templates/login.html @@ -73,3 +73,4 @@ + diff --git a/decide/booth/static/booth/style.css b/decide/booth/static/booth/style.css index e5aa677cad..0d8c2359e1 100644 --- a/decide/booth/static/booth/style.css +++ b/decide/booth/static/booth/style.css @@ -2,3 +2,44 @@ margin-top: 20px; margin-left: 40px; } + +#customBtn { + display: inline-block; + background: white; + color: #444; + width: 190px; + border-radius: 5px; + border: thin solid #888; + box-shadow: 1px 1px 1px grey; + white-space: nowrap; +} + +#main { + text-align: center; +} + +#customBtn:hover { + cursor: pointer; +} + +span.label { + font-family: serif; + font-weight: normal; +} + +span.icon { + display: inline-block; + vertical-align: middle; + width: 20px; + height: 42px; +} + +span.buttonText { + display: inline-block; + vertical-align: middle; + padding-left: 20px; + padding-right: 42px; + font-size: 14px; + font-weight: bold; + font-family: 'Roboto', sans-serif; +} diff --git a/decide/booth/templates/booth/booth.html b/decide/booth/templates/booth/booth.html index 3970690e45..ed0c618953 100644 --- a/decide/booth/templates/booth/booth.html +++ b/decide/booth/templates/booth/booth.html @@ -1,13 +1,17 @@ {% extends "base.html" %} -{% load i18n static %} +{% load i18n static %} +{% load socialaccount %} +{% providers_media_js %} {% block extrahead %} + {% endblock %} + {% block content %}
@@ -23,7 +27,9 @@ [[ alertMsg ]] - + {% if user.is_authenticated %} + Logout + {% endif %}

[[ voting.id ]] - [[ voting.name ]]

@@ -49,7 +55,38 @@

[[ voting.id ]] - [[ voting.name ]]

{% trans "Login" %} +
+ Inicia sesiĆ³n con: +
+
+ +
+
+ +
+
+ +
+ + + +

[[ voting.question.desc ]]

@@ -64,8 +101,10 @@

[[ voting.question.desc ]]

{% trans "Vote" %}
+
+ {% endblock %} {% block extrabody %} @@ -151,6 +190,7 @@

[[ voting.question.desc ]]

} }); }, + onSubmitLogin(evt) { evt.preventDefault(); this.postData("{% url "gateway" "authentication" "/login/" %}", this.form) diff --git a/decide/decide/settings.py b/decide/decide/settings.py index 27bbe53d4f..7c2cc23140 100644 --- a/decide/decide/settings.py +++ b/decide/decide/settings.py @@ -10,7 +10,6 @@ """ import os - # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) @@ -57,7 +56,18 @@ ] -IMPORT_EXPORT_USE_TRANSACTIONS = True +SOCIALACCOUNT_PROVIDERS = { + 'google': { + 'SCOPE': [ + 'profile', + 'email', + ], + 'AUTH_PARAMS': { + 'access_type': 'online', + } + } +} + REST_FRAMEWORK = { 'DEFAULT_AUTHENTICATION_CLASSES': ( @@ -70,6 +80,7 @@ AUTHENTICATION_BACKENDS = [ 'django.contrib.auth.backends.ModelBackend', 'base.backends.AuthBackend', + 'allauth.account.auth_backends.AuthenticationBackend' ] MODULES = [ @@ -210,15 +221,13 @@ INSTALLED_APPS = INSTALLED_APPS + MODULES -AUTHENTICATION_BACKENDS = ( - 'django.contrib.auth.backends.ModelBackend', - 'allauth.account.auth_backends.AuthenticationBackend' -) -SITE_ID = 3 + + +SITE_ID = 1 LOGIN_REDIRECT_URL = '/authentication/redirection' -LOGOUT_REDIRECT_URL = '/authentication/signin' +LOGOUT_REDIRECT_URL = '/booth/voting' NOSE_ARGS = [ @@ -230,13 +239,5 @@ # django_heroku.settings(locals(),test_runner=False) -AUTHENTICATION_BACKENDS = ( - 'django.contrib.auth.backends.ModelBackend', - 'allauth.account.auth_backends.AuthenticationBackend' -) -SITE_ID = 3 - -LOGIN_REDIRECT_URL = '/' - import django_heroku django_heroku.settings(locals(),test_runner=False)