From 680bb56e999707a9be23aad327989ecdfc10c9e7 Mon Sep 17 00:00:00 2001 From: mario Date: Thu, 19 Nov 2015 10:36:55 +0100 Subject: [PATCH] Clean up demo codebase --- demo/demo/settings.py | 8 ++++++-- demo/requirements.pip | 4 ++-- docs/installation.rst | 10 +++++----- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/demo/demo/settings.py b/demo/demo/settings.py index f0c75b7..c82f703 100644 --- a/demo/demo/settings.py +++ b/demo/demo/settings.py @@ -29,8 +29,10 @@ ALLOWED_HOSTS = [] TEMPLATE_CONTEXT_PROCESSORS = ( 'django.contrib.auth.context_processors.auth', "django.core.context_processors.request", - "allauth.account.context_processors.account", - "allauth.socialaccount.context_processors.socialaccount", + + # Disabling due to alluth>=0.21.0 changes + # "allauth.account.context_processors.account", + # "allauth.socialaccount.context_processors.socialaccount", ) # Application definition @@ -51,6 +53,8 @@ INSTALLED_APPS = ( 'allauth', 'allauth.account', 'rest_auth.registration', + 'allauth.socialaccount', + 'allauth.socialaccount.providers.facebook', ) MIDDLEWARE_CLASSES = ( diff --git a/demo/requirements.pip b/demo/requirements.pip index c836413..83585ac 100644 --- a/demo/requirements.pip +++ b/demo/requirements.pip @@ -1,4 +1,4 @@ -django>=1.5.0 +django>=1.7.0 django-rest-auth==0.5.0 -django-allauth==0.19.1 +django-allauth==0.24.1 six==1.9.0 diff --git a/docs/installation.rst b/docs/installation.rst index 989bcb8..7eff39b 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -87,11 +87,9 @@ Using ``django-allauth``, ``django-rest-auth`` provides helpful class for creati 'allauth.socialaccount.providers.facebook', ) -2. Add ``allauth.socialaccount.context_processors.socialaccount`` to TEMPLATE_CONTEXT_PROCESSORS in django settings +2. Add Social Application in django admin panel -3. Add Social Application in django admin panel - -4. Create new view as a subclass of ``rest_auth.registration.views.SocialLoginView`` with ``FacebookOAuth2Adapter`` adapter as an attribute: +3. Create new view as a subclass of ``rest_auth.registration.views.SocialLoginView`` with ``FacebookOAuth2Adapter`` adapter as an attribute: .. code-block:: python @@ -101,7 +99,7 @@ Using ``django-allauth``, ``django-rest-auth`` provides helpful class for creati class FacebookLogin(SocialLoginView): adapter_class = FacebookOAuth2Adapter -5. Create url for FacebookLogin view: +4. Create url for FacebookLogin view: .. code-block:: python @@ -109,3 +107,5 @@ Using ``django-allauth``, ``django-rest-auth`` provides helpful class for creati ..., url(r'^rest-auth/facebook/$', FacebookLogin.as_view(), name='fb_login') ) + +.. note:: Starting from v0.21.0, django-allauth has dropped support for context processors. Check out http://django-allauth.readthedocs.org/en/latest/changelog.html#from-0-21-0 for more details.