【问题标题】:djangocms tutorial installation failure AttributeError: 'module' has no attribute 'atomic'djangocms 教程安装失败 AttributeError: 'module' has no attribute 'atomic'
【发布时间】:2014-09-29 12:48:58
【问题描述】:

我一直在尝试安装 djangocms,但没有成功。详情如下

我有以下系统:

Windows 8.1 64 bit installation
Python 2.7.8

您将在 djangocms 输出中看到我最终使用了推荐用于安装的 django 版本:

Django version 1.5

我已经开始运行 djangocms 教程https://github.com/divio/django-cms-tutorial/blob/master/Step%201%20-%20Initial%20Setup.md

我已经安装了一个新的 python、pip 和 virtualenv。然后我创建了 virtualenv,激活它,并使用该 virtualenv 中的 pip 来安装包

djangocms 安装程序

当我进入运行步骤时遇到错误

djangocms -p 。我的网站

在这一步中,我指定了安装中推荐的 django 版本。 Django 版本(选择:1.4、1.5、1.6、稳定)[默认稳定]:1.5

我真的无法理解输出。我已经阅读并尽我所能搜索了这个小组网站,以及教程的 github 网站上的问题跟踪器

输出在下面的要点链接中。请注意,我对此输出做了一个小改动,我将 djangocms 项目命名为 mysite 而不是 my_site。我都遇到了同样的失败

https://gist.github.com/GaryHendrick/107ec2db9dad14928bfd

初始栈读取后的错误

AttributeError: 'module' 对象没有属性 'atomic'

你们中有人遇到过这种情况吗?

最好的问候,

加里

【问题讨论】:

  • 你使用的是哪个 Django 版本?
  • 我在上面进行了编辑以指示 Django 版本。 djangocms 可执行文件提示输入版本规范,教程指示用户使用 1.5,我这样做了。
  • 问题是django-reversion,你用的是哪个版本?我之前遇到过这个错误,执行 pip install django-reversion>=1.7,

标签: python django django-cms


【解决方案1】:

原来djangocms的教程在8月5号改了,you can see the change history here,按照改后的说明就可以防止这个错误的出现,不过以后可能会有一些人通过我的经验有所帮助。我会解释的

冒出来的异常

djangocms -p . my_site

曾经

AttributeError: 'module' object has no attribute 'atomic'

原来是我在出现提示时选择运行 Django 1.5 导致了这个问题:

Django version (choices: 1.4, 1.5, 1.6, stable) [default stable]:

您将看到以下链接表明原子设置是 Django 1.6 版的新设置。

https://docs.djangoproject.com/en/1.6/ref/settings/#std:setting-DATABASE-ATOMIC_REQUESTS

如果您需要使用 Django 版本

【讨论】:

    猜你喜欢
    • 2013-07-26
    • 2022-12-01
    • 1970-01-01
    • 2022-08-04
    • 2021-05-09
    • 2017-05-10
    • 2015-09-26
    • 2020-11-23
    • 2022-08-24
    相关资源
    最近更新 更多