I have managed to connect django 2.0 with mongoengine. Every other thing is working fine apart from the authentication part. in my settings.py I have the following:
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
#For Mongo Authentication
'mongoengine.django.mongo_auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'app',
]
AUTH_USER_MODEL = 'mongo_auth.MongoUser'
MONGOENGINE_USER_DOCUMENT = 'mongoengine.django.auth.User'
and am getting the following error
core/checks/registry.py", line 73, in run_checks
new_errors = check(app_configs=app_configs)
File "/home/user/virtualenvs/project/lib/python3.5/site-packages/django/contrib/auth/checks.py", line 74, in check_user_model
if isinstance(cls().is_anonymous, MethodType):
AttributeError: 'MongoUser' object has no attribute 'is_anonymous'
From the error above I see that the problem is at the declaration of the AUTH_MODEL_USER . I have not created any Custom User Model as I want to be able to user the django.uath User model....I need idea on how I can set it up and be able to create users and have them login. how should I go about??