使用pycharm創(chuàng)建django工程
項(xiàng)目目錄結(jié)構(gòu)
manage.py
django1---工程主文件夾
__init__.py
settings.py
urls.py
wsgi.py
templates --模板文件夾
-manage.py 項(xiàng)目管理器 工具集 在pycharm面板的下方找到terminal 執(zhí)行 python manage.py 查看
Available subcommands:
[auth]
changepassword
createsuperuser
[contenttypes]
remove_stale_contenttypes
[django]
check
compilemessages
createcachetable
dbshell
diffsettings
dumpdata
flush
inspectdb
loaddata
makemessages
makemigrations
migrate
sendtestemail
shell
showmigrations
sqlflush
sqlmigrate
sqlsequencereset
squashmigrations
startapp
startproject
test
testserver
[sessions]
clearsessions
[staticfiles]
collectstatic
findstatic
runserver
啟動(dòng)工程
/Users/cx/.conda/envs/django1/bin/python manage.py runserver 8080
-wsgi.py WSGI (Python Web Server Gateway Interface)(python服務(wù)器網(wǎng)關(guān)接口) python應(yīng)用于web服務(wù)器之間的接口,
項(xiàng)目與外界交互的關(guān)鍵 不會(huì)用到不要?jiǎng)?不要管它
-urls.py 路由配置文件
-settings.py 核心配置文件