django-rest-framework-mongoengine-example
django-rest-framework-mongoengine-example copied to clipboard
AttributeError: 'MongoUser' object has no attribute 'is_anonymous'
AUTHENTICATION_BACKENDS = ( 'mongoengine.django.auth.MongoEngineBackend', #'django_mongoengine.mongo_auth.backends.MongoEngineBackend', #'mongo_auth.backends.MongoEngineBackend', ) AUTH_USER_MODEL = 'mongo_auth.MongoUser'
MONGOENGINE_USER_DOCUMENT = 'userprofile.models.User'
Versions please? I bet you're using wrong version of some library.
Try installing the exact versions from requirements.txt
.
Django==1.11.13 django-mongodb-engine==0.6.0 django-rest-framework-mongoengine==3.3.1 djangorestframework==3.8.2 djangotoolbox==1.8.0 mongoengine==0.9.0 pymongo==3.6.1 pytz==2018.4 six==1.11.0
This example is tested to wok with:
django==1.9 djangorestframework==3.3.3 mongoengine==0.9 pymongo==2.7 django-rest-framework-mongoengine
I'm afraid, I can't offer a version that is guaranteed to work with later versions. If you could update some of those and send a PR, I'd be happy to accept it.