简体   繁体   English

settings.py不存在Django

[英]settings.py does not exist django

Running Python 2.7 Mac OSX. 运行Python 2.7 Mac OSX。

I did: 我做了:

django-admin.py startproject test123
cd test123
open settings.py

Error: /users.../test123/settings.py does not exist. 错误:/ /users.../test123/settings.py不存在。

Why is this happening? 为什么会这样呢?

By default django creates folder named test123 if doesn't exists, and then puts settings in python package called test123 https://docs.djangoproject.com/en/1.10/ref/django-admin/#startproject 默认情况下,django如果不存在则创建名为test123文件夹,然后将设置放入名为test123 python包中https://docs.djangoproject.com/en/1.10/ref/django-admin/#startproject

So your settings will be in test123 subfolder of test123 所以,你的设置将在test123的子文件夹test123

django-admin.py startproject test123
cd test123
ls -la
open test123/settings.py

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM