1

i saw some topic about my problem however i didn' t find the solution for it and i don' t know what i' m doing wrong.

Since this is a test system,

  • i delete my whole db
  • i run syncdb && migrate to have everything clear.
  • i set the SITE_ID to 1
  • i restart apache2 (well, not using development server at the moment)
  • in the admin -> Sites -> Sites section i set the example.com to mysub.mydomain.com (for both the display name and domain name)
  • in the admin -> Socialaccount -> Social apps section i add a new app:
    • provider: facebook
    • name: the same name than on developers.facebook.com
    • client id: App ID/API Key from developers.facebook.com
    • Key: stays None
    • Secret: App Secret from developers.facebook.com
    • Chosen sites: i move here the only one existing which is mysub.mydomain.com (on developers.facebook.com i' ve the same mysub.mydomain.com at App Domains)
  • in the settings.py file i' ve these relevant sections:

    • MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'debug_toolbar.middleware.DebugToolbarMiddleware', )
    • INSTALLED_APPS = (..., 'allauth', 'allauth.account', 'allauth.socialaccount', 'allauth.socialaccount.providers.facebook', )
    • TEMPLATE_CONTEXT_PROCESSORS += ('common.context_processors.add_app_name', 'django.core.context_processors.request', 'allauth.account.context_processors.account', 'allauth.socialaccount.context_processors.socialaccount',)
    • AUTHENTICATION_BACKENDS = ( 'django.contrib.auth.backends.ModelBackend', 'allauth.account.auth_backends.AuthenticationBackend', )
    • SOCIALACCOUNT_PROVIDERS = \ { 'facebook': { 'SCOPE': ['email'], 'AUTH_PARAMS': {'auth_type': 'reauthenticate'}, 'METHOD': 'oauth2', 'LOCALE_FUNC': lambda request: 'en_US', } }
  • to the urls.py: url(r'^accounts/', include('allauth.urls')),

. After all these (and apache2 restart) when i go to mysub.mydomain.com/accounts/login/ (i log out from admin at first) i got the same error than for example here:

Django-allauth No Facebook app configured: please add a SocialApp using the Django admin

. I don' t really know what else can be the problem but i' d be happy if someone could point me to the right direction or to tell me what else to check.

Thanks.

Community
  • 1
  • 1
user2194805
  • 1,201
  • 1
  • 17
  • 35

0 Answers0