这是我注册的xadmin APP

 INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'users',
    'courses',
    'operation',
    'organization',
    'xadmin',
    'crispy_forms'
]


这是网址

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),
]


但是我不知道该怎么办,我才刚开始学习django

  File "C:\Users\PC_LF\Envs\testvir2\lib\site-packages\xadmin\__init__.py", line 4, in <module>
    from xadmin.sites import AdminSite, site
  File "C:\Users\PC_LF\Envs\testvir2\lib\site-packages\xadmin\sites.py", line 3, in <module>
    from future.utils import iteritems
ImportError: No module named 'future'

最佳答案

这将解决您的问题

pip install django-import-export

关于python - 使用xadmin时出错,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/46076129/

10-13 00:25