Grundsätzlich ist hier alles geschrieben. https://github.com/omab/python-social-auth/blob/master/MIGRATING_TO_SOCIAL.md
Da das Paket von python-social-auth seit v0.3 unterteilt ist, scheint es notwendig zu sein, das Paket hinzuzufügen und die Einstellung zu ändern.
Der auskommentierte Teil ist der umgeschriebene Teil.
settings.py
INSTALLED_APPS = [
    # 'social.apps.django_app.default',
    'social_django',
]
TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [os.path.join(BASE_DIR, 'templates'),],
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': [
                # 'social.apps.django_app.context_processors.backends',
                # 'social.apps.django_app.context_processors.login_redirect',
                'social_django.context_processors.backends',
                'social_django.context_processors.login_redirect',
            ],
        },
    },
]
AUTHENTICATION_BACKENDS = [
    # 'social.backends.twitter.TwitterOAuth',
    'social_core.backends.twitter.TwitterOAuth',
    'django.contrib.auth.backends.ModelBackend',
]
urls.py
urlpatterns = [
    # url(r'^social/', include('social.apps.django_app.urls', namespace='social')),
    url(r'^social/', include('social_django.urls', namespace='social')),
]
# python-social-Upgrade auth installiert viele verwandte Pakete
pip install -U python-social-auth
#Installieren Sie zusätzliche Pakete für Django
pip install social-auth-app-django
# migrate
python manage.py migrate
Recommended Posts