Install Python: Python is Django's host language, using the Django framework, you must first install the Python language to Windows,
Official website is: python.org If you can not go may be screened in mainland China, you can search for download.
This tutorial uses the 2.5.2 version, you can choose the 2.4 - 2.6 version, the installation can be completed step by step follow the prompts.
Increase the Python environment variable to your system, Python is installed by default in the system's root directory,
For example C: \ Python25; Right "My Computer" -> "Properties" -> "Advanced" -> "Environment variables", locate the Path variable name double-click to open, edit its value,
The end of the variable value items, coupled with a semicolon + python installation directory, such as:; C: \ Python25, can be determined,
Open the Windows of the Dos window, enter python, then Python console to come out to explain the environment variables in this configuration is successful,
Can be directly input print "Hello World!" To do some testing, huh, huh!
Django installation: Now the Dos install Django1.1.1, and install the package in the official website,
Downloaded file is tar.gz compressed file, you can extract with RAR compression tool, such as compression in the C drive under
Path is C: \ Django-1.1.1 \ Django-1.1.1, switch to the Dos window (if you still Python console, press Ctrl + C out),
Django just enter the extraction path, such as: cd C: \ Django-1.1.1 \ Django-1.1.1
Install Django. Such as: python setup.py install, the system will automatically about a minute or two installed.
Django is installed to the Python library path where relevant,
Eg: C: \ Python25 \ Lib \ site-packages \ django course, some documents were also dependent on Python-related classes attached to library, and
We do not care about this, the system is good for us, we just need to add to the environment variables in Django can, and
Practices and environment variables above, the increase is similar to Python, Django copy the installation path C: \ Python25 \ Lib \ site-packages \ django to the Path variable, the
I remember at the end of the original variable value with a semicolon and then paste C: \ Python25 \ Lib \ site-packages \ django, there is a need to add up the path, which is:
C: \ Python25 \ Scripts, add up, you can use Django's django-admin.py command of the new construction.
Django environment to be configured here, you can go to Dos to create the first Django app.
If you want to C: \ to create a Django project, under the Dos like: cd c: \
The next step is python django-admin.py startproject myproject;
Command to create the project myproject is your name, and you now can see the existence of myproject under c drive, and it was amazing,
Django has you create a project, and several Django project directory generated Python file (__init__.py, manage.py, etc.), and finally re-enter just Dos new project directory: cd myproject,
And Dos in input manage.py runserver, start the Django's own Web server,
In the browser, enter: 127.0.0.1:8000, you can browse the site to create a.
Komodo Edit Configuration: have a Django development IDE, may be more efficient, for the time being I choose Komodo Edit,
Can be downloaded at the official network. Note Komodo IDE is a fee, to learn enough to use Komodo Edit.
Installation is not cumbersome, and installation is complete, the menu bar "Edit" - "preferences" - "language" - "python", the
Add the path to Python and Django in the development process, can have python django syntax prompt function.
Incidentally, the encoding settings problem
In the "Edit" - "preferences" - "Internationalzation" - "Language-specific Default Encoding" setting required under the file type (html, python, css, etc.) The default encoding is utf-8, later you only new type of document that time
The default is utf-8 encoding, and save a file to be specified for each new code.