drf xadmin
1. 复制3.6可用的xadmin到extra_apps中\
2. pip install -i https://pypi.douban.com/simple django-crispy-forms django-import-export django-reversion django-formtools future httplib2 six xlwt xlsxwriter
3. installed_apps中
'django_filters', 'crispy_forms', 'xadmin',
4. urls.py中
import xadmin urlpatterns = [ # url(r'^admin/', admin.site.urls), url(r'^xadmin/', xadmin.site.urls), ]
5. 中文化
# 设置时区 LANGUAGE_CODE = 'zh-hans' #中文支持,django1.8以后支持;1.8以前是zh-cn TIME_ZONE = 'Asia/Shanghai' USE_I18N = True USE_L10N = True USE_TZ = False #默认是Ture,时间是utc时间,由于我们要用本地时间,所用手动修改为false!!!!
6. 创建超级用户
createsuperuser
django.core.exceptions.ValidationError: ['’‘ 必须为合法的日期格式,请使用 YYYY-MM-DD 格式。']