diff --git a/setup.py b/setup.py index fd3963b..0ae9bdf 100644 --- a/setup.py +++ b/setup.py @@ -40,6 +40,6 @@ package_dir={'': 'src'}, include_package_data=True, install_requires=['django>=1.5', - 'django-social-auth>=0.7.8', + 'django-browserid', 'mailmanclient'] ) diff --git a/src/postorius/templates/postorius/login.html b/src/postorius/templates/postorius/login.html index 236e477..a139223 100644 --- a/src/postorius/templates/postorius/login.html +++ b/src/postorius/templates/postorius/login.html @@ -2,8 +2,10 @@ {% load url from future %} {% load i18n %} {% load staticfiles %} +{% load browserid %} {% block main %} +{% browserid_info %}

{% trans "Login with username and password or with Mozilla Persona" %}

@@ -17,15 +19,18 @@
-
-
{% csrf_token %} - - {% trans 'Login using BrowserID' %} -
-

{% trans "Mozilla Persona is an easy way to sign into multiple websites, while still controlling your personal data. For more information see the Mozilla website" %}.

- + + {% trans 'Login using BrowserID' %} + +

{% trans "Mozilla Persona is an easy way to sign into multiple websites, while still controlling your personal data. For more information see the Mozilla website" %}. +

+
@@ -35,24 +40,19 @@ {% block additionaljs %} + + diff --git a/testing/test_settings.py b/testing/test_settings.py index 54a922c..5cc5f93 100755 --- a/testing/test_settings.py +++ b/testing/test_settings.py @@ -89,8 +89,7 @@ AUTHENTICATION_BACKENDS = ( 'django.contrib.auth.backends.ModelBackend', - 'social_auth.backends.OpenIDBackend', - 'social_auth.backends.browserid.BrowserIDBackend', + 'django_browserid.auth.BrowserIDBackend', ) TEMPLATE_CONTEXT_PROCESSORS = ( @@ -103,9 +102,6 @@ "django.core.context_processors.csrf", "django.contrib.messages.context_processors.messages", "postorius.context_processors.postorius", - 'social_auth.context_processors.social_auth_by_name_backends', - 'social_auth.context_processors.social_auth_backends', - 'social_auth.context_processors.social_auth_by_type_backends', ) MIDDLEWARE_CLASSES = ( @@ -141,7 +137,7 @@ 'django.contrib.admin', 'django.contrib.staticfiles', 'postorius', - 'social_auth', + 'django_browserid', # These are only used for development # 'debug_toolbar', ) @@ -149,6 +145,10 @@ LOGIN_REDIRECT_URL = '/postorius/' LOGIN_ERROR_URL = '/postorius/accounts/login/' +def username(email): + return email.rsplit('@', 1)[0] +BROWSERID_USERNAME_ALGO = username + TEST_RUNNER = 'django_nose.NoseTestSuiteRunner' NOSE_ARGS = [ '--with-coverage',