0
我是新來的django-nonrel,我試圖讓djang0-testapp運行。不能讓django-testapp工作或創建一個超級用戶django-norel
我甚至無法創建超級用戶。我下面的說明從here
我下載了Django的testapp從here
我把所有的Django的testapp內所需的文件夾爲指導告訴我的事情。
我注意到settings.py文件在manage.py文件的項目folderalong中。
這與正常的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.
)
謝謝托馬斯的回覆。我有一個settings.py文件,它的語法是正確的。你的建議幫助我發現我已經拷貝了django-testapp中的錯誤目錄。我已經複製了外部文件夾而不是內部文件夾。 – Laurence