执行djangocms -f -p时出错。我的网站

时间:2016-09-28 16:10:19

标签: python django django-cms

执行djangocms -f -p . mysite时遇到问题 该过程已启动但在必须创建管理员用户时失败。

Creating admin user
/Users/ccsguest/Site/djangoProject/django1101/bin/python2.7: can't open file 'create_user.py': [Errno 2] No such file or directory
The installation has failed.

Traceback (most recent call last):
  File "/Users/ccsguest/Site/djangoProject/django1101/bin/djangocms", line 11, in <module>
    sys.exit(execute())
  File "/Users/ccsguest/Site/djangoProject/django1101/lib/python2.7/site-packages/djangocms_installer/main.py", line 41, in execute
    django.setup_database(config_data)
  File "/Users/ccsguest/Site/djangoProject/django1101/lib/python2.7/site-packages/djangocms_installer/django/__init__.py", line 394, in setup_database
    create_user(config_data)
  File "/Users/ccsguest/Site/djangoProject/django1101/lib/python2.7/site-packages/djangocms_installer/django/__init__.py", line 411, in create_user
    subprocess.check_call([sys.executable, 'create_user.py'], env=env)
  File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 541, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/Users/ccsguest/Site/djangoProject/django1101/bin/python2.7', u'create_user.py']' returned non-zero exit status 2

该过程创建了项目的文件夹,里面我有所有正常的文件和文件夹,但有一个文件调用create_user.py,当我运行服务器时,我看到登录页面,但我从未定义用户和密码

我的环境有此配置

cmsplugin-filer==1.1.3
dj-database-url==0.4.1
Django==1.8.15
django-appconf==1.0.2
django-classy-tags==0.8.0
django-cms==3.4.0
django-filer==1.2.5
django-formtools==1.0
django-mptt==0.8.6
django-polymorphic==0.8.1
django-sekizai==0.10.0
Django-Select2==4.3.2
django-treebeard==4.0.1
djangocms-admin-style==1.2.4
djangocms-attributes-field==0.1.1
djangocms-column==1.7.0
djangocms-googlemap==0.5.2
djangocms-installer==0.9
djangocms-link==2.0.1
djangocms-snippet==1.9.1
djangocms-style==1.7.0
djangocms-text-ckeditor==3.2.1
djangocms-video==2.0.2
easy-thumbnails==2.3
html5lib==0.9999999
Pillow==3.3.1
pytz==2016.6.1
six==1.10.0
South==1.0.2
tzlocal==1.2.2
Unidecode==0.4.19

任何想法如何解决问题!

提前感谢

1 个答案:

答案 0 :(得分:1)

我有同样的问题 添加&#39; -w&#39;为我做了诀窍:

source venv/bin/activate
mkdir project_name
cd project_name
djangocms -w -f -p . project_name