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
注册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
标签:xadmin,admin,manage,django,import,py 来源: https://blog.csdn.net/weixin_47513022/article/details/117442967