Clean up demo codebase

This commit is contained in:
mario 2015-11-19 10:36:55 +01:00
parent 6ace9de268
commit 680bb56e99
3 changed files with 13 additions and 9 deletions

View File

@ -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 = (

View File

@ -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

View File

@ -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.