下載python-2.7.2.msi http://www.python.org/getit/
Django-1.3.1.tar.gz https://www.djangoproject.com/
Django暫時只支援python 2.4 ~ 2.7, 在Django-1.3.1\docs\intro\install.txt中有說明: Being a Python Web framework, Django requires Python. It works with any Python
version from 2.4 to 2.7 (due to backwards
incompatibilities in Python 3.0, Django does not currently work with
Python 3.0;安裝python-2.7.2,並添加環境變數D:\Python27;D:\Python27\Scripts;命令列進入Django-1.3.1目錄, 安裝djangopython setup.py installDjango提供了tutorialDjango-1.3.1\docs\intro建立網站E:\python>django-admin.py startproject mysite啟動django內建的web伺服器E:\python>cd mysiteE:\python\mysite>manage.py runserver
Validating models...
0 errors found
Django version 1.3.1, using settings 'mysite.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.在瀏覽器中輸入 http://127.0.0.1:8000/ 瀏覽頁面ps:在windows7中按上述步驟配置好後,出現下列情況
D:\work\python>django-admin.py startproject mysite
Usage: django-admin.py subcommand [options] [args]
...
很顯然django-admin.py不參識別startproject命令,其它命令也不能識別。不過,另一種方式卻可以D:\Python27\Scripts>python django-admin.py startproject mysite
這說明django-admin.py 後面的參數不能傳遞進去,可以通過修改註冊表實現。輸入regedit, 進入 HKEY_CLASSES_ROOT\py_auto_file\shell\open\command , "C:\Python26\python.exe"
"%1" change it to "C:\Python26\python.exe" "%1" %*成功解決了