I am trying to setup Django-allauth in my project. I am running into this error and am unable to fix it.
Environment:
Request Method: GET Request URL: `http://localhost:8000/accounts/login/`
Django Version: 1.4.2 Python Version: 2.7.3
Installed Applications:
('django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'core',
'allauth',
'allauth.account',
'allauth.socialaccount',
'allauth.socialaccount.providers.facebook',
'allauth.socialaccount.providers.twitter',
'django.contrib.admin',
'django.contrib.admindocs')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware')
Template error: In template
/media/Dump/Sites/wtr/allauth/templates/socialaccount/snippets/login_extra.html,
error at line 3 No Facebook app configured: please add a SocialApp
using the Django admin
1 : {% load socialaccount %}
2 :
3 : {% providers_media_js %}
4 :
5 :
I actually configured a facebook app in Django Admin but can’t understand why it’s giving this exception.
Exception Type: ImproperlyConfigured at /accounts/login/ Exception
Value: No Facebook app configured: please add a SocialApp using the
Django admin
- I added allauth apps to the
INSTALLED_APPLICATIONS - Added that
TEMPLATE_CONTEXT_PROCESSORSsetting - Edited the setting,
AUTHENTICATION_BACKENDS - Added
allauthurls inurls.py
Is this all that is required to be done or is there some more? If yes, could you please point me to the relevant docs?
The problem could be with your database. Think you need to synchronize the Database.
DO
if that does not work, make sure the
Sitewhich you added your facebook app to has the domainlocalhost:8000if you are using localhost or127.0.0.1:8000if you are using 127.0.0.1:8000For more information go through this allauth tutorial.
UPDATE
you could also try removing the
example.comsite from the admin and add a new site that useslocalhost:8000or127.0.0.1:8000and add the facebook social app under the new site. Also, do not forget to set theSITE_IDvariable in yoursettings.pyfile.