Abhilash Raj has proposed merging 
lp:~raj-abhilash1/postorius/postorius_standalone into 
lp:~mailman-coders/postorius/postorius_standalone.

Requested reviews:
  Mailman Coders (mailman-coders)

For more details, see:
https://code.launchpad.net/~raj-abhilash1/postorius/postorius_standalone/+merge/251951

Replace django-social-auth with django-browserid for python3 compatibility.
-- 
Your team Mailman Coders is requested to review the proposed merge of 
lp:~raj-abhilash1/postorius/postorius_standalone into 
lp:~mailman-coders/postorius/postorius_standalone.
=== modified file 'settings.py'
--- settings.py	2014-11-24 13:37:35 +0000
+++ settings.py	2015-03-05 14:30:13 +0000
@@ -92,8 +92,7 @@
 
 AUTHENTICATION_BACKENDS = (
     'django.contrib.auth.backends.ModelBackend',
-    'social_auth.backends.OpenIDBackend',
-    'social_auth.backends.browserid.BrowserIDBackend',
+    'django_browserid.auth.BrowserIDBackend',
 )
 
 TEMPLATE_CONTEXT_PROCESSORS = (
@@ -106,9 +105,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 = (
@@ -144,7 +140,7 @@
     'django.contrib.admin',
     'django.contrib.staticfiles',
     'postorius',
-    'social_auth',
+    'django_browserid',
     # These are only used for development
     # 'debug_toolbar',
     # 'django_nose',
@@ -152,23 +148,13 @@
 LOGIN_URL          = '/postorius/accounts/login/'
 LOGIN_REDIRECT_URL = '/postorius/'
 LOGIN_ERROR_URL    = '/postorius/accounts/login/'
-SOCIAL_AUTH_COMPLETE_URL_NAME  = 'socialauth_complete'
-SOCIAL_AUTH_DEFAULT_USERNAME = 'new_social_auth_user'
-SOCIAL_AUTH_USERNAME_IS_FULL_EMAIL = True
-SOCIAL_AUTH_SESSION_EXPIRATION = False
 
-SOCIAL_AUTH_PIPELINE = (
-    'social_auth.backends.pipeline.social.social_auth_user',
-    'social_auth.backends.pipeline.associate.associate_by_email',
-    'social_auth.backends.pipeline.user.get_username',
-    'social_auth.backends.pipeline.user.create_user',
-    'social_auth.backends.pipeline.social.associate_user',
-    'social_auth.backends.pipeline.social.load_extra_data',
-    'social_auth.backends.pipeline.user.update_user_details'
-)
+def username(email):
+    return email.rsplit('@', 1)[0]
+BROWSERID_USERNAME_ALGO = username
 
 # These settings are only needed to run the test suite:
-# 
+#
 TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
 # NOSE_ARGS = [
 #     '--with-coverage',

=== modified file 'urls.py'
--- urls.py	2013-03-22 17:30:34 +0000
+++ urls.py	2015-03-05 14:30:13 +0000
@@ -26,13 +26,13 @@
 admin.autodiscover()
 
 # Import mailman urls and set urlpatterns if you want to hook
-# mailman_django into an existing django site. 
+# mailman_django into an existing django site.
 # Otherwise set ROOT_URLCONF in settings.py to
 # `mailman_django.urls`.
 # from mailman_django import urls as mailman_urls
 
 urlpatterns = patterns('',
+    url('', include('django_browserid.urls')),
     url(r'^$', 'postorius.views.list_index'),
     (r'^postorius/', include('postorius.urls')),
-	url(r'', include('social_auth.urls')),
 )

_______________________________________________
Mailman-coders mailing list
Mailman-coders@python.org
https://mail.python.org/mailman/listinfo/mailman-coders

Reply via email to