输入django-admin
D:\caseplatform\Api>django-admin
Type 'django-admin help <subcommand>' for help on a specific subcommand.
Available subcommands:
[django]
check
compilemessages
createcachetable
dbshell
diffsettings
dumpdata
flush
inspectdb
loaddata
makemessages
makemigrations
migrate
runserver
sendtestemail
shell
showmigrations
sqlflush
sqlmigrate
sqlsequencereset
squashmigrations
startapp
startproject
test
testserver
Note that only Django core commands are listed as settings are not properly configured (error: Requested setting INSTALLED_APPS, but settings are not configured. You must either defi
ne the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.).
命令行方式
django-admin startproject caseplatform .
我们用pycharm打开caseplatform(File->Open),项目结构如下:
- manage.py: 一个实用的命令行工具,可让你以各种方式与该 Django 项目进行交互。
- caseplatform/init.py: 一个空文件,告诉 Python 该目录是一个 Python 包。
- caseplatform/settings.py: 该 Django 项目的设置/配置。
- caseplatform/urls.py: 该 Django 项目的 URL 声明; 一份由 Django 驱动的网站”目录”。
- caseplatform/wsgi.py: 一个 WSGI 兼容的 Web 服务器的入口,以便运行你的项目。