我是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.
)
答案 0 :(得分:0)
这与django-nonrel
无关。
您的settings.py
文件是否存在?
如果是,则可能在语法上不正确,运行python settings.py
以识别SyntaxError
。