I am using mongoengine (v0.9) as a mapper for my Django (v1.8) project running by Python 3.4.
Although I have added following codes to settings.py file, I still keep receiving this error while a user try to connect to admin using django default admin process)
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'mongoengine.django.mongo_auth',
'myapp',
)
AUTHENTICATION_BACKENDS = ('mongoengine.django.auth.MongoEngineBackend',)
SESSION_ENGINE = 'mongoengine.django.sessions'
connect('mymongodb')
AttributeError at /admin/login/
'MetaDict' object has no attribute 'pk'
Request Method: POST
Request URL: http://myapp.dev:8000/admin/login/
Django Version: 1.8
Exception Type: AttributeError
Exception Value: 'MetaDict' object has no attribute 'pk'
Exception Location: c:\Programs\Python34\lib\site-packages\django\contrib\auth__init__.py in login, line 111
Python Executable: c:\Programs\Python34\python.exe
Python Version: 3.4.2
P.S: I have also tried customizing Login Process by writing URL patterns, template and views, but will get same error on calling "login()" function.