AttributeError:'tuple'对象没有属性'insert' [英] AttributeError: 'tuple' object has no attribute 'insert'

查看:1625
本文介绍了AttributeError:'tuple'对象没有属性'insert'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经从 http://www.django-mongodb.org安装了以下内容/topics/setup.html

django-nonrel

django-nonrel

djangotoolbox

djangotoolbox

mongodb-engine

mongodb-engine

安装后我试图运行我的程序使用 python manage.py runserver

after installing i tried to run my program using python manage.py runserver

它显示如下错误,

Validating models...

Unhandled exception in thread started by <bound method Command.inner_run of <django.contrib.staticfiles.management.commands.runserver.Command object at 0x1655450>>
Traceback (most recent call last):
  File "/home/sakeer/workspace/entevirtual/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 92, in inner_run
    self.validate(display_num_errors=True)
  File "/home/sakeer/workspace/entevirtual/lib/python2.7/site-packages/django/core/management/base.py", line 280, in validate
    num_errors = get_validation_errors(s, app)
  File "/home/sakeer/workspace/entevirtual/lib/python2.7/site-packages/django/core/management/validation.py", line 28, in get_validation_errors
    from django.db import models, connection
  File "/home/sakeer/workspace/entevirtual/lib/python2.7/site-packages/django/db/__init__.py", line 40, in <module>
    backend = load_backend(connection.settings_dict['ENGINE'])
  File "/home/sakeer/workspace/entevirtual/lib/python2.7/site-packages/django/db/__init__.py", line 34, in __getattr__
    return getattr(connections[DEFAULT_DB_ALIAS], item)
  File "/home/sakeer/workspace/entevirtual/lib/python2.7/site-packages/django/db/utils.py", line 93, in __getitem__
    backend = load_backend(db['ENGINE'])
  File "/home/sakeer/workspace/entevirtual/lib/python2.7/site-packages/django/db/utils.py", line 27, in load_backend
    return import_module('.base', backend_name)
  File "/home/sakeer/workspace/entevirtual/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/home/sakeer/workspace/entevirtual/lib/python2.7/site-packages/django_mongodb_engine-0.4.0-py2.7.egg/django_mongodb_engine/__init__.py", line 13, in <module>

AttributeError: 'tuple' object has no attribute 'insert'

我使用Django 1.5和python 2.7

i am using Django 1.5 and python 2.7

提前感谢

推荐答案

django-mongodb-engine expects settings.INSTALLED_APPS 由于某种原因而成为列表。

django-mongodb-engine expects settings.INSTALLED_APPS to be a list for some reason.

您必须更改

INSTALLED_APPS = (
   .. apps ..
)

INSTALLED_APPS = [
   .. apps ..
]

这完全是 django-mongodb-engine 的错误,他们应该感觉不好。

This is totally django-mongodb-engine's fault and they should feel bad.

 

他们有这个问题七个月,不要担心。

They have this issue for seven months and show no concern.

这篇关于AttributeError:'tuple'对象没有属性'insert'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆