add a special response for failed social auths

pull/1/head
eric 2013-04-09 00:05:31 -04:00
parent 74c8d52176
commit 1ee2d5c634
3 changed files with 6 additions and 0 deletions

View File

@ -0,0 +1,2 @@
{% extends "registration/from_pledge.html" %}
{% block login_pitch %}<h3>OK, you don't want to use Google to sign in, so try another way. </h3>{% endblock %}

View File

@ -102,6 +102,7 @@ MIDDLEWARE_CLASSES = (
'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware', 'django.contrib.messages.middleware.MessageMiddleware',
'maintenancemode.middleware.MaintenanceModeMiddleware', 'maintenancemode.middleware.MaintenanceModeMiddleware',
'social_auth.middleware.SocialAuthExceptionMiddleware',
) )
ROOT_URLCONF = 'regluit.urls' ROOT_URLCONF = 'regluit.urls'
@ -237,6 +238,7 @@ TWITTER_EXTRA_DATA = [('profile_image_url_https', 'profile_image_url_https'),('s
LOGIN_URL = "/accounts/superlogin/" LOGIN_URL = "/accounts/superlogin/"
LOGIN_REDIRECT_URL = "/" LOGIN_REDIRECT_URL = "/"
LOGOUT_URL = "/accounts/logout/" LOGOUT_URL = "/accounts/logout/"
LOGIN_ERROR_URL = '/accounts/login-error/'
USER_AGENT = "unglue.it.bot v0.0.1 <https://unglue.it>" USER_AGENT = "unglue.it.bot v0.0.1 <https://unglue.it>"

View File

@ -18,6 +18,8 @@ urlpatterns = patterns('',
{'template_name': 'registration/from_pledge.html'}), {'template_name': 'registration/from_pledge.html'}),
url(r'^accounts/login/add/$',superlogin, url(r'^accounts/login/add/$',superlogin,
{'template_name': 'registration/from_add.html'}), {'template_name': 'registration/from_add.html'}),
url(r'^accounts/login-error/$',superlogin,
{'template_name': 'registration/from_error.html'}),
(r'^accounts/edit/$', 'regluit.frontend.views.edit_user'), (r'^accounts/edit/$', 'regluit.frontend.views.edit_user'),
(r'^accounts/', include('registration.backends.default.urls')), (r'^accounts/', include('registration.backends.default.urls')),
url('accounts/', include('email_change.urls')), url('accounts/', include('email_change.urls')),