使用django和python时出错

时间:2014-08-29 13:07:46

标签: python django mongodb manage.py

mongodb的数据库设置

    DATABASES = {  
         'default': {  
            'ENGINE': 'django_mongodb_engine',  
            'NAME': 'test',  
            'USER': '',  
            'PASSWORD': '',  
            'HOST': 'localhost',  
            'PORT': '27017',  
            'SUPPORTS_TRANSACTIONS': False,  
        } 

安装了mongodb引擎,mongodb-norel,pymongo ..如果我遗漏任何东西,请指导我..

C:\Python27\mysastha>python manage.py runserver
c:\python27\lib\site-packages\djangotoolbox-1.6.2-py2.7.egg\djangotoolbox\db\uti
ls.py:1: RemovedInDjango19Warning: The django.db.backends.util module has been r
enamed. Use django.db.backends.utils instead.
  from django.db.backends.util import format_number

c:\python27\lib\site-packages\djangotoolbox-1.6.2-py2.7.egg\djangotoolbox\db\uti
ls.py:1: RemovedInDjango19Warning: The django.db.backends.util module has been r
enamed. Use django.db.backends.utils instead.
  from django.db.backends.util import format_number

Performing system checks...

System check identified no issues (0 silenced).
Unhandled exception in thread started by <function wrapper at 0x0318CAB0>
Traceback (most recent call last):
  File "c:\python27\lib\site-packages\django-1.8-py2.7.egg\django\utils\autorelo
ad.py", line 225, in wrapper
    fn(*args, **kwargs)
  File "c:\python27\lib\site-packages\django-1.8-py2.7.egg\django\core\managemen
t\commands\runserver.py", line 104, in inner_run
    self.check_migrations()
  File "c:\python27\lib\site-packages\django-1.8-py2.7.egg\django\core\managemen
t\commands\runserver.py", line 156, in check_migrations
    executor = MigrationExecutor(connections[DEFAULT_DB_ALIAS])
  File "c:\python27\lib\site-packages\django-1.8-py2.7.egg\django\db\migrations\
executor.py", line 17, in __init__
    self.loader = MigrationLoader(self.connection)
  File "c:\python27\lib\site-packages\django-1.8-py2.7.egg\django\db\migrations\
loader.py", line 48, in __init__
    self.build_graph()
  File "c:\python27\lib\site-packages\django-1.8-py2.7.egg\django\db\migrations\
loader.py", line 179, in build_graph
    self.applied_migrations = recorder.applied_migrations()
  File "c:\python27\lib\site-packages\django-1.8-py2.7.egg\django\db\migrations\
recorder.py", line 59, in applied_migrations
    self.ensure_schema()
  File "c:\python27\lib\site-packages\django-1.8-py2.7.egg\django\db\migrations\
recorder.py", line 49, in ensure_schema
    if self.Migration._meta.db_table in self.connection.introspection.get_table_
list(self.connection.cursor()):
  File "c:\python27\lib\site-packages\django-1.8-py2.7.egg\django\db\backends\__
init__.py", line 1295, in get_table_list
    raise NotImplementedError('subclasses of BaseDatabaseIntrospection may requi
re a get_table_list() method')
NotImplementedError: subclasses of BaseDatabaseIntrospection may require a get_t
able_list() method

0 个答案:

没有答案