首页 \ 问答 \ Django 1.5 mongodb没有wotk(Django 1.5 mongodb does not wotk)

Django 1.5 mongodb没有wotk(Django 1.5 mongodb does not wotk)

我在两个项目中工作,第一个是使用django / mysql开发的,另一个是使用django / mongodb。

第一个是使用django1.5它可以工作,但第二个只能在django1.3中工作,我相信mongodb在django1.5中不起作用。

当我尝试在django1.5中运行django / mongodb项目时,我得到:

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

我该如何解决? 我可以在同一台计算机上安装django(1.3和1.5)并将它们用于某些不同的项目吗?

我是mongodb的新手。

提前致谢。


I'm working in two projects, the first one is been developed using django/mysql and the other uses django/mongodb.

The first is using django1.5 and it works but the second only works in django1.3, I believe mongodb does not work in django1.5.

When I try to run the django/mongodb project in django1.5 I get:

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

How can I solve it? can I install both django(1.3 and 1.5) in the same computer and use them for some different projects?

I'm a newbie with mongodb.

Thanks in advance.


原文:https://stackoverflow.com/questions/17393330
更新时间:2022-09-24 08:09

最满意答案

您可能会发现这些链接很有用。

realpython.com dabapps.com


You might find these links useful.

realpython.com dabapps.com

相关问答

更多
  • 那么,这是初学者中最常见的问题之一。 我,我自己面临这个问题,确实建立了多个项目,而不用担心虚拟环境。 但是,最近我意识到使用虚拟环境的重要性。 使用虚拟环境的一些好处是: 依赖管理 :防止多个项目依赖关系之间的冲突。 在不同的机器上安装和设置新项目的简易性 :将您的依赖项存储在requirements.txt文件中,然后运行pip install -r requirements.txt来安装所需的任何依赖项。 Well, this is one of the most common questions a ...
  • 我也感觉到所有的依赖关系 - 解决Anaconda的威力可能仅仅是为了思考Python。 绝对不。 Anaconda安装Conda。 Conda是一名软件包和环境经理,不仅适用于Python,也适用于R,Julia,Perl,Scala等,包括Go。 如果你想运行Go,你需要创建一个新的环境: conda create --name go --channel-name conda-forge go 然后转到新的环境运行使用: activate go I also get the feeling all ...
  • 您可能会发现这些链接很有用。 realpython.com dabapps.com You might find these links useful. realpython.com dabapps.com
  • 使用yolk来发现过时的依赖关系: $ yolk --show-updates Paste 1.7.2 (1.7.5.1) PasteDeploy 1.3.3 (1.5.0) PasteScript 1.7.3 (1.7.5) coverage 3.4 (3.6) … 要安装缺少的,通常的方法是为pip install -r设置requirements.txt 。 如果您的意思是如何最初构建其中一个,那么在您的项目上运行例如pylint将发现未满足的导入。 Use yolk to spot out ...
  • 不幸的是,PyDev的工作方式,它希望所有的解释器都配置为“eclipse-wide”(然后在给定的项目中你可以说哪一个应该用于那个特定的项目,如果它不应该是默认项目)。 另一个选项实际上是每个项目有一个Eclipse工作区(然后你为它配置一个“eclipse-wide”解释器)。 另一种选择,如果解释器来自相同的Python版本并且您只是更改已安装的库,那么将创建一个“eclipse-wide”解释器作为所有项目的默认解释器,然后配置其他路径以包含在PYTHONPATH每个项目。 我个人通常做的是每个项目 ...
  • 由于WSGIDaemonProcess在Windows上不可用,因此我在WSGIDaemonProcess中按以下方式管理它: 这是我的httpd.conf的相关部分: WSGIPythonPath "C:/wamp/www" WSGIScriptAlias /im "C:/wamp/www/im/im/wsgi.py" Order deny,allow Require ...
  • 是的,你可以删除一个并在其他服务器上创建新的env。 只要确保你有依赖关系列表。 您可以通过activating您的环境并输入以下内容创建此列表: pip freeze > requirements.txt 稍后,如果您想要安装这些依赖关系,只需激活新的env并输入 pip install -r requirements.txt 所有库都将安装正确的版本。 pip freeze命令的输出示例如下: pip freeze ...
  • 我认为这里的困惑是你应该做的。 在任何标准项目中,您都应该拥有一个手工培养的项目依赖项列表。 大多数django用户将该列表放入requirements.txt (通常建议)或setup.py 。 您可以始终有多个要求:requirements-test.txt,requirements-dev.txt等。在其他文件的顶部使用-r requirements.txt来“导入”其他要求: # requirements.txt django=1.11.3 接着... # requirements-test.tx ...
  • 我建议使用virtualenv创建的根目录作为源文件的根目录。 虚拟环境旨在与项目绑定,而不是在不同项目之间共享。 例如,假设我在~/school目录中编写了很多代码。 我virtualenv ENV ~/school ,做virtualenv ENV 。 现在我有一个ENV目录,用于保存项目的源文件和依赖项。 因此,您可以创建一个~/school/ENV/source文件夹,用于保存所有源文件夹。 所有虚拟环境文件都靠近您的程序,可以在ENV目录中轻松访问。 编辑: 解决问题的一部分:只要您跟踪您的环境, ...
  • 在MicrosoftDocs GitHub上发布问题后,我收到了zooba的以下回复: 在这个领域肯定有一些工作正在进行中。 我们在这里寻找不同的设计以及更好地调整VS和VS代码的方法。 对于Visual Studio:Python项目文件中的虚拟环境的意图是您在项目目录中具有环境,因此它仅由相对路径引用。 如果你还在你的项目中保留一个requirements.txt文件,那么只需要点击几下就可以在新机器上重新创建它(我们已经考虑过自动提示来帮助这里,但大多数用户反馈表明我们还有其他东西可以修复第一)。 所 ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)