首页 > 代码库 > django+xadmin在win7-64bit下安装记录
django+xadmin在win7-64bit下安装记录
### django+xadmin在win7-64bit下安装简单记录
1、下载python: https://www.python.org/ftp/python/2.7.12/python-2.7.12.amd64.msi
安装 python-2.7.12.amd64.msi # 注释选择安装路径,这里是:D:\ProgramFiles\Python27
2、配置环境变量Path里: # 计算机—>右键—>高级系统设置—>高级—>环境变量—>修改Path,加入:
D:\ProgramFiles\Python27;D:\ProgramFiles\Python27\Scripts;
3、下载xadmin: https://github.com/sshwsfc/xadmin
解压xadmin-master.zip到D:\ProgramFiles\Python27\xadmin # 我放置在python安装路径下了
4、安装django+xadmin:
>pip install -r requirements.txt D:\ProgramFiles\Python27\xadmin\requirements.txt
5、配置环境变量Path里:
D:\ProgramFiles\Python27\Lib\site-packages\django
6、测试版本:
D:\ProgramFiles\Python27\Scripts>python
>>> import django
>>> django.get_version()
‘1.9.10‘
>>> quit()
7、测试页面
>cd D:\ProgramFiles\Python27\xadmin\demo_app
>python manage.py runserver 0.0.0.0:8000 # 显示如下信息:
D:\ProgramFiles\Python27\xadmin\demo_app>python manage.py runserver 0.0.0.0:8000
Performing system checks...
System check identified no issues (0 silenced).
You have unapplied migrations; your app may not work properly until they are app
lied.
Run ‘python manage.py migrate‘ to apply them.
October 31, 2016 - 14:50:16
Django version 1.9.10, using settings ‘demo.settings‘
Starting development server at http://0.0.0.0:8000/
Quit the server with CTRL-BREAK.
### 浏览器访问::http://IP:8000 # 显示页面表示安装成功
8、导入数据
D:\ProgramFiles\Python27\xadmin\demo_app>python manage.py migrate
D:\ProgramFiles\Python27\xadmin\demo_app>python manage.py createsuperuser
D:\ProgramFiles\Python27\xadmin\demo_app>python manage.py runserver 0.0.0.0:8000
### 浏览器访问::http://IP:8000
### 使用设置的账号密码admin\admin登录进入系统
本文出自 “老瓦房” 博客,转载请与作者联系!
django+xadmin在win7-64bit下安装记录