# 3.2.12 会知道版本
dream@DreamdeMacBook-Pro day54_Django % pip installdjango==3.2.12
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Requirement already satisfied: django==3.2.12 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (3.2.12)
Requirement already satisfied: asgiref<4,>=3.3.2 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from django==3.2.12)(3.7.2)
Requirement already satisfied: pytz in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from django==3.2.12)(2023.3.post1)
Requirement already satisfied: sqlparse>=0.2.2 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from django==3.2.12)(0.4.4)
Requirement already satisfied: typing-extensions>=4in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from asgiref<4,>=3.3.2->django==3.2.12)(4.9.0)
【2】安装之后会出现一个文件夹
【3】查看Django命令
django-admin
django-adminType 'django-admin help <subcommand>'forhelp on a specific subcommand.Available subcommands:[django]checkcompilemessagescreatecachetabledbshelldiffsettingsdumpdataflushinspectdbloaddatamakemessagesmakemigrationsmigraterunserversendtestemailshellshowmigrationssqlflushsqlmigratesqlsequenceresetsquashmigrationsstartappstartprojecttesttestserver
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 define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.).
dream@DreamdeMacBook-Pro demo01 % python310 manage.py runserver
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.
September 27, 2024 - 03:44:26
Django version 3.2.12, using settings 'demo01.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C. # 如果 你想结束项目退出 CONTROL-C