1、安装指定Django版本
C:\Users\win7>pip install Django==1.11.8
2、查看安装的django版本
C:\Users\win7>pip show django
Name: Django
Version: 1.11.8
Summary: A high-level Python Web framework that encourages rapid development and
clean, pragmatic design.
Home-page: https://www.djangoproject.com/
Author: Django Software Foundation
Author-email: [email protected]
License: BSD
Location: c:\python36\lib\site-packages
Requires: pytz
3、卸载Django
C:\Users\win7>pip uninstall django
pytz in c:\python36\lib\site-packages #进入Django安装目录删除django文件夹
4、创建一个Django应用
C:\Users\win7>python manage.py startapp blog
5、初始化数据库
Django 1.7.1 及以上的版本需要用以下命令
C:\Users\win7>python manage.py makemigrations
C:\Users\win7>python manage.py migrate