只能是django2.0.x,如果2.1的话,需要修改源码
xadmin依赖
pip install django-crispy-forms
pip install django-formtools
pip install django-reversion
pip install xlwt
pip install xlsxwriter
pip install future
pip install six
pip install httplib2
pip install django-import-export
pip install django==2.0.9
django-admin startproject abc
cd abc
mkdir extra_apps
将xadmin解压到目录
vi settings.py
...
import sys
sys.path.insert(0, os.path.join(BASE_DIR, 'extra_apps'))
APP中添加
xadmin
crispy_forms
urls.py
添加
import xadmin
urlpatterns = [
#path('admin/', admin.site.urls),
path('xadmin/', xadmin.site.urls),
]
python manage.py makemigrations
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver
阅读(1901) | 评论(0) | 转发(0) |