标签:https div dir sha top src ini 设置 module
创建用户
manage.py@MxOnline > createsuperuser
===修改admin配置=============
LANGUAGE_CODE = ‘zh-hans‘# 语言
TIME_ZONE = ‘Asia/Shanghai‘ #时区
USE_I18N = True
USE_L10N = True
USE_TZ = False #Ture 国际时间 False 本地时间
===========================
遇到配置数据库出错,可能原因在users文件配置中增加了apps 文件 ,找到全部删除‘’apps.‘’
====================
安装xadmin 可以终端输入
pip install xadmin
配置xadmin
=====================================================
下载xadmin源码
下载地址:https://github.com/sshwsfc/xadmin
解压安装包 将xadmin 移动到
设置搜索路径
卸载下载的包pip uninstall xadmin
添加环境路径
sys.path.insert(0, os.path.join(BASE_DIR, ‘extra_apps‘))
出现以下错误
File "E:\python27\lib\importlib\__init__.py", line 37, in import_module __import__(name) File "C:\Users\admin\Desktop\study\MxOnline\extra_apps\xadmin\__init__.py", line 4, in <module> from xadmin.sites import AdminSite, site File "C:\Users\admin\Desktop\study\MxOnline\extra_apps\xadmin\sites.py", line 3, in <module> from future.utils import iteritems ImportError: No module named future.utils Unhandled exception in thread started by <function wrapper at 0x03F3BAF0>
File "C:\Users\admin\Desktop\study\MxOnline\extra_apps\xadmin\plugins\__init__.py", line 41, in register_builtin_plugins [import_module(‘xadmin.plugins.%s‘ % plugin) for plugin in PLUGINS if plugin not in exclude_plugins] File "E:\python27\lib\importlib\__init__.py", line 37, in import_module __import__(name) File "C:\Users\admin\Desktop\study\MxOnline\extra_apps\xadmin\plugins\importexport.py", line 48, in <module> from import_export.admin import DEFAULT_FORMATS, SKIP_ADMIN_LOG, TMP_STORAGE_CLASS ImportError: No module named import_export.admin
安装
pip install python-future
安装
pip install django-import-export
安装
pip install six
都安装完 就可以启动了
标签:https div dir sha top src ini 设置 module
原文地址:http://www.cnblogs.com/Mjonj/p/7629980.html