2
我這樣安裝和配置Django/MongoDB!錯誤是:沒有模塊名爲django_mongodb_engine.base
PIP安裝的virtualenv
源的myproject/bin中/激活
PIP安裝汞柱+ HTTPS://bitbucket.org/wkornewald/django-nonrel
PIP安裝汞柱+ HTTPS: //bitbucket.org/wkornewald/djangotoolbox
PIP安裝的git +的https://github.com/django-nonrel/mongodb-engine
所有這些操作都是成功的!
現在,當我改變了settings.py文件像這樣:
DATABASES = {
'default': {
'ENGINE': 'django_mongodb_engine', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'mong_db', # Or path to database file if using sqlite3.
'USER': '', # Not used with sqlite3.
'PASSWORD': '', # Not used with sqlite3.
'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
'PORT': '', # Set to empty string for default. Not used with sqlite3.
}
發生的令人費解的錯誤:
Error was: No module named django_mongodb_engine.base
顯然安裝成功django_mongodb_engine。但爲什麼會出現這個錯誤?
btw,原諒我可憐的英語!