您可以将 contrib.auth.models.User 或任何 contrib.auth 与Django MongoDB Engine一起使用吗?
我已按指示配置了 MongoDB 引擎,并且对于自定义模型可以正常工作,但是:
from django.contrib.auth.models import User
a = User.objects.create_user(username='foo', email='foo@bar.com',
password='foo123bar')
a.save()
...
ERROR: An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line statement', (5, 0))
...
ValueError: invalid literal for int() with base 10: '4f3757d4eb60261dae000001'
有没有办法使用普通的用户模型和身份验证系统,还是我现在必须实现自己的?
如果当前不支持或未知领域,是否可以将用户存储在 mysql 中,而我的所有 mongodb 引擎模型都存储在 MongoDB 中?