django xadmin

安装依赖包:

django==2.2
django-crispy-forms
django-import-export
django-reversion
django-formtools
future==0.15.2
httplib2==0.9.2
six==1.10.0

安装xadmin

pip install https://codeload.github.com/sshwsfc/xadmin/zip/django2

解决版本不兼容问题

xadmin报错 ImportError: cannot import name ‘SKIP_ADMIN_LOG‘ from
‘import_export.admin‘

进入:xadmin\plugins\importexport.py
django xadmin

注册app

INSTALLED_APPS = (

'xadmin',
'crispy_forms',

...

)

配置url:

import xadmin
xadmin.autodiscover()
urlpatterns = [
    # path('admin/', admin.site.urls),
    path('xadmin/', xadmin.site.urls),

]

执行迁移

python manage.py migrate

创建超级管理员用户

python manage.py createsuperuser

登录

127.0.0.1:8000/xadmin

上一篇:Unity为Git项目部署Jenkins


下一篇:Jenkins插件管理