Answer the question
In order to leave comments, you need to log in
Why am I getting the error "django.db.utils.OperationalError: no such table: social_auth_usersocialauth"?
Installed "python-social-auth-django" . I'm trying to login to a site with Twitter and I'm getting that error. Basically, when I click on the link to login with twitter, Twitter asks for authorization permission and then says that you will be redirected back, then I get "django.db.utils.OperationalError: no such table: social_auth_usersocialauth".
my settings.py
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'fighter',
'avatar',
'social.apps.django_app.default',
]
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
'django.template.context_processors.i18n',
'django.template.context_processors.media',
'django.template.context_processors.static',
'django.template.context_processors.tz',
'django.template.context_processors.csrf',
'social.apps.django_app.context_processors.backends',
'social.apps.django_app.context_processors.login_redirect',
],
},
},
]
AUTHENTICATION_BACKENDS = (
# 'social.backends.facebook.FacebookOAuth2',
# 'social.backends.google.GoogleOAuth2',
'social.backends.twitter.TwitterOAuth',
'django.contrib.auth.backends.ModelBackend',
)
# for Twitter
SOCIAL_AUTH_TWITTER_KEY = '****************'
SOCIAL_AUTH_TWITTER_SECRET = '************************'
LOGIN_REDIRECT_URL = '/demo'
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question