2014-08-30 85 views
-1

無法啓動C:\ Python27 \ mysastha> python manage.py runserver c:\ python27 \ lib \ site-packages \ djangotoolbox-1.6.2-py2.7.egg \ djangotoolbox \ db \ uti ls.py:5:RemovedInDjango19警告:django.utils.unittest將在Djan 中去掉1.9。 從django.utils.unittest進口跳過django無法啓動runserver

Traceback (most recent call last): 
    File "manage.py", line 17, in <module> 
    execute_from_command_line(sys.argv) 
    File "c:\python27\lib\site-packages\django-1.8-py2.7.egg\django\core\managemen 
t\__init__.py", line 330, in execute_from_command_line 
    utility.execute() 
    File "c:\python27\lib\site-packages\django-1.8-py2.7.egg\django\core\managemen 
t\__init__.py", line 304, in execute 
    django.setup() 
    File "c:\python27\lib\site-packages\django-1.8-py2.7.egg\django\__init__.py", 
line 21, in setup 
    apps.populate(settings.INSTALLED_APPS) 
    File "c:\python27\lib\site-packages\django-1.8-py2.7.egg\django\apps\registry. 
py", line 108, in populate 
    app_config.import_models(all_models) 
    File "c:\python27\lib\site-packages\django-1.8-py2.7.egg\django\apps\config.py 
", line 197, in import_models 
    self.models_module = import_module(models_module_name) 
    File "c:\python27\lib\importlib\__init__.py", line 37, in import_module 
    __import__(name) 
    File "c:\python27\lib\site-packages\django-1.8-py2.7.egg\django\contrib\auth\m 
odels.py", line 40, in <module> 
    class Permission(models.Model): 
    File "c:\python27\lib\site-packages\django-1.8-py2.7.egg\django\db\models\base 
.py", line 127, in __new__ 
    new_class.add_to_class('_meta', Options(meta, **kwargs)) 
    File "c:\python27\lib\site-packages\django-1.8-py2.7.egg\django\db\models\base 
.py", line 303, in add_to_class 
    value.contribute_to_class(cls, name) 
    File "c:\python27\lib\site-packages\django-1.8-py2.7.egg\django\db\models\opti 
ons.py", line 166, in contribute_to_class 
    self.db_table = truncate_name(self.db_table, connection.ops.max_name_length(
)) 
    File "c:\python27\lib\site-packages\django-1.8-py2.7.egg\django\db\__init__.py 
", line 36, in __getattr__ 
    return getattr(connections[DEFAULT_DB_ALIAS], item) 
    File "c:\python27\lib\site-packages\django-1.8-py2.7.egg\django\db\utils.py", 
line 238, in __getitem__ 
    backend = load_backend(db['ENGINE']) 
    File "c:\python27\lib\site-packages\django-1.8-py2.7.egg\django\db\utils.py", 
line 127, in load_backend 
    raise ImproperlyConfigured(error_msg) 
django.core.exceptions.ImproperlyConfigured: 'django_mongodb_engine' isn't an av 
ailable database backend. 
Try using 'django.db.backends.XXX', where XXX is one of: 
    u'django_mongodb_engine', u'mysql', u'oracle', u'postgresql_psycopg2', u'sql 
ite3' 
Error was: cannot import name decimal_to_string 
+0

你可以從您的設置posrr數據庫配置? – skzryzg 2014-08-30 11:41:40

+0

數據庫= { '缺省':{ '發動機': 'django_mongodb_engine', 'NAME': 'OSINFO', 'USER': '', 'PASSWORD': '', 'HOST':' localhost', 'PORT':'27017', 'SUPPORTS_TRANSACTIONS':False, }, } – shiller 2014-08-31 05:44:55

+0

請勿使用django 1.8,它不適合公衆使用。使用1.6.5的穩定版本 – 2014-08-31 06:24:27

回答

0

只要按照跟蹤的說明了。您需要django.db.backends.django_mongodb_engine作爲引擎。不只是django_mongodb_engine.

如果你還沒有,你可能會需要一對夫婦依賴關係的引擎工作。即時通訊的移動和不知道他們被稱爲目前爲mongodb