01命令创建django项目
1.首先安装django库
pip install django
2.创建项目django-admin
需要把D:\Python310\Scripts 添加到环境变量中,或者使用绝对路径创建项目
django-admin startproject demo
3.进入目录激活及启动项目
cd demo
activate demo
python manage.py runserver 0.0.0.0:8080
(Python310) D:\Users\Administrator\PycharmProjects\pythonProject\公司项目\04自动化项目\autoCmic>python manage.py runserver 0.0.0.0:8090 Watching for file changes with StatReloader Performing system checks... System check identified no issues (0 silenced). You have 18 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions. Run 'python manage.py migrate' to apply them. July 05, 2023 - 16:54:51 Django version 4.2.3, using settings 'autoCmic.settings' Starting development server at http://0.0.0.0:8090/ Quit the server with CTRL-BREAK.