您好,登錄后才能下訂單哦!
### 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登錄進入系統
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。