1 安装满足django2的版本
pip3 install https://codeload.github.com/sshwsfc/xadmin/zip/django2
2 urls.py里面增加路由
path('xadmin/', xadmin.site.urls),
3 setting.py里面 增加后面三个
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'blog',
'xadmin',
'crispy_forms',
'reversion',
]
4 数据迁移
python3 manage.py makemigration
python3 manage.py migrate