无法让django-testapp工作或使用django-norel创建超级用户

时间:2013-08-31 15:51:32

标签: python django django-models

我是django-nonrel的新手,我正试图让djang0-testapp运行。

我甚至无法创建超级用户。我按照here

的说明操作

我从here

下载了django-testapp

我将所有必需的文件夹放在django-testapp中,正如指示告诉我的那样。

我注意到settings.py文件位于带有manage.py文件的项目中。

这与正常的django不同 具有manage.py文件和内部文件夹的项目文件夹 它有settings.py文件。

当我尝试创建超级用户时,我收到以下错误消息。

C:\Users\laurence\Documents\GitHub\django-testapp>manage.py createsuperuser
Error: Can't find the file 'settings.py' in the directory containing 'C:\\Users\
\laurence\\Documents\\GitHub\\django-testapp\\manage.py'. It appears you've cust
omized things.
You'll have to run django-admin.py, passing it your settings module.
(If the file settings.py does indeed exist, it's causing an ImportError somehow.

1 个答案:

答案 0 :(得分:0)

这与django-nonrel无关。


您的settings.py文件是否存在?

如果是,则可能在语法上不正确,运行python settings.py以识别SyntaxError