Mongoengine & Django-allauth for facebook login

I want to use django-allauth in combination with MongoEngine in my Django project. The idea is that new users will be created in mongodb instead of mysql. I added the necessary steps for my configuration to enable mongoengine in django settings file.

Now I am trying to enable django-allauth so that users can login with facebook and their account was created in mongodb.

So far, the settings file looks like this:

TEMPLATE_CONTEXT_PROCESSORS = (
    # Required by allauth template tags
    "django.core.context_processors.request",
    # allauth specific context processors
    "allauth.account.context_processors.account",
    "allauth.socialaccount.context_processors.socialaccount",
)


# Application definition

INSTALLED_APPS = (
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'allauth',
    'allauth.account',
    'allauth.socialaccount',
)

AUTHENTICATION_BACKENDS = (
    'mongoengine.django.auth.MongoEngineBackend',
    "allauth.account.auth_backends.AuthenticationBackend",
)

      

How can I get both to work together?

+3


source to share





All Articles