django-cms 中 create_user.py 的问题

issue with create_user.py in django-cms

我刚开始使用 django-cms,但遇到了一些问题。我用了virtualenv.please help.The 下面是错误:

Traceback (most recent call last):

 File "create_user.py", line 4, in <module>

    from django.contrib.auth import get_user_model

  File "/home/mayankmodi/SSAD18/Source/env/local/lib/python2.7/site-packages
/django/contrib/auth/__init__.py", line 7, in < module>

    from django.middleware.csrf import rotate_token

 File "/home/mayankmodi/SSAD18/Source/env/local/lib/python2.7/site-packages
/django/middleware/csrf.py", line 14, in <module>

    from django.utils.cache import patch_vary_headers

  File "/home/mayankmodi/SSAD18/Source/env/local/lib/python2.7/site-packages/django/utils/cache.py", line 26, in <module>

    from django.core.cache import caches

  File "/home/mayankmodi/SSAD18/Source/env/local/lib/python2.7/site-packages/django/core/cache/__init__.py", line 34, in <module>

    if DEFAULT_CACHE_ALIAS not in settings.CACHES:

  File "/home/mayankmodi/SSAD18/Source/env/local/lib/python2.7/site-packages/django/conf/__init__.py", line 48, in __getattr__

    self._setup(name)

  File "/home/mayankmodi/SSAD18/Source/env/local/lib/python2.7/site-packages
/django/conf/__init__.py", line 42, in _setup

    % (desc, ENVIRONMENT_VARIABLE))

django.core.exceptions.ImproperlyConfigured: Requested setting CACHES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.

有人可以告诉我要编辑哪些特定文件以及我应该进行哪些编辑

请尝试 运行改为使用此命令:

djangocms -w web

这将启动 djangocms-installer 向导,运行 您将完成各种设置、依赖项,并创建一个超级用户供您登录。完成后,您应该在 ./web/.

中有一个 运行ning 的 django-cms 实例

您可以像往常一样进入 ./web/ 和 运行ning runserver 来访问新实例:

$ source venv/bin/activate
(venv) $ python manage.py runserver

几周前我遇到了同样的问题。我认为新版本 (djangocms-installer==0.9.x) 有问题,因为当我使用默认的 djangocms-installer(==0.9.0) 创建项目时,如 "djangcms -p . mysite",没有问题关于数据库、django 版本等,然后错误...

试试旧版本 "pip install djangocms-installer==0.8.x"(x=12,11,10,...)

现在,我正在使用 "djangocms-installer==0.8.12",没有任何错误。