xadmin安装:
1.pip安装:pip install xadmin
2.手动安装:github网址:https://github.com/sshwsfc/xadmin
安装中可能会出现报错:
执行以下命令:
pip install --upgrade setuptools
python -m pip install --upgrade pip
pip 安装pip install xadmin依然报错如下,则使用手动安装:
手动下载安装包,修改报错文件后缀为txt,steup.py中加载的对应文件名,再执行 pip install xadmin-master.zip进行手动安装:
xadmin使用:
seetings.py:
INSTALLED_APPS = [ ...... 'xadmin', 'crispy_forms', ]
urls.py:
from django.conf.urls import url from django.contrib import admin import xadmin urlpatterns = [ # url(r'^admin/', admin.site.urls), url(r'^xadmin/', xadmin.site.urls), ]