Django2.2安装和使用

一、安装

pip install django==2.2

升级到最新

pip install django -U

查看安装版本

 

python -m django --version

二、创建工程

django-admin.py startproject mysite2

 

三、创建应用

 

 

四、运行项目

 

python manage.py runserver
DESKTOP-R5E7NDM:/mnt/d/程序缓存/website/mysite2 # python manage.py runserver
Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).

You have 17 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.

April 20, 2020 - 10:50:08
Django version 2.2, using settings 'mysite2.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.

五、查看网页

http://127.0.0.1:8000/

Django2.2安装和使用_第1张图片

 

你可能感兴趣的:(Python)