我是 django 的新手,当我将默认 sqlite3 引擎更改为“djongo”时,我遇到了无法迁移更改的问题。
我正在使用ubuntu服务器,我已经完成了以下步骤:
$ pip3 install djongo
# setup djongo
DATABASES = {
'default': {
'ENGINE': 'djongo',
'NAME': 'zoo',
}
}
我不知道是什么问题,但是当我迁移更改时,我收到以下错误消息:
File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/home/karam/.local/lib/python3.5/site-packages/djongo/base.py", line 12, in <module>
from .cursor import Cursor
File "/home/karam/.local/lib/python3.5/site-packages/djongo/cursor.py", line 2, in <module>
from .sql2mongo.query import Result
File "/home/karam/.local/lib/python3.5/site-packages/djongo/sql2mongo/__init__.py", line 34
self.alias2op: typing.Dict[str, SQLToken] = alias2op
SyntaxError: invalid syntax
任何想法我错过了什么?