Configuring Django development environment under Windows

2010-04-27  来源:本站原创  分类:Python  人气:294 

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.

相关文章
  • Configuring Django development environment under Windows 2010-04-27

    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. Thi

  • Development environment under Windows configuration Rails3 2010-09-16

    Development environment under Windows configuration Rails3 Many students like the Mac website under development with Rails. Unfortunately, I did not condition a few years ago on black. Would also like to play Rails3, then try the next configuration i

  • Configuration Rails3 development environment under Windows 2010-09-16

    Development environment under Windows configuration Rails3 Many students like the Mac website under development with Rails. Unfortunately, I did not condition a few years ago on black. Would also like to play Rails3, then try the next configuration i

  • How to build Android development environment under Windows (to) 2010-10-11

    Development environment to build Android Download the Android SDK 1 http://code.google.com/android/download.html http://www.cnd8.com/soft/25873.htm This is the official website, go into the process followed to select for your platform (in this case W

  • Php development environment under Windows XP build 2010-12-16

    1 Release Notes Apache version: apache 2.2.4 Php version: php 5.2.3 Mysql version: mysql 5.1.19 Apache, Php5 and store the best Php file documents in the same directory level 2 apache download and installation 2.1 Download the following link to downl

  • wxPython development environment under windows installation and configuration 2010-03-19

    To prepare the installation files: Python and wxPython Runtime Environment installed Installing python-2.6.2.msi, wxPython2.8-win32-unicode-2.8.10.1-py26.exe wxPython2.8-win32-docs-demos-2.8.10.1.exe and py2exe-0.6.9.win32-py2.6.exe python installati

  • Django development environment set up under Ubuntu 2010-06-01

    Each update should reinstall ubuntu again, in order to avoid forget to record what. Install easy_install, will ez_setup.py download the file to run locally, running through easy_install-h Show help. Installed django, sudo easy_install django. Install

  • Install and configure Django development environment (Eclipse + Pydev) 2010-12-23

    The so-called must first sharpen his tools. Python, there are many tools, including Eclipse + Pydev is one of them. Although the python @ newsmth the home at the end of the combined evaluation of these articles is not high, but in pipi's insistence a

  • Building Erlang development environment in Windows, 2011-01-09

    1, download Windows operating environment otp_win32_R14B01.exe under Erlang 2, set the path to the implementation of erl file path into the Path 3, adding the library path setting Erlang in classpath, the code is placed: code: add_patha ("c: / / ma /

  • python web development framework - the Django development environment for interactive configuration 2010-03-05

    Introduction: In windows or other operating systems, we use manager.py shell for django interactive operation, as CMD operate very convenient, so we can bring in advanced interactive program manager.py now I am using DreamPie . Optional interactive p

  • Build Java Web development environment under Windows 2010-04-02

    Summary 1. SSH development of related software and development kit download 2. Software installation and related settings 3. Simple Web program 1. Software Downloads in D drive to build a directory JavaTools, used to store the downloaded software and

  • Configuring PHP Development Environment 2010-05-24

    Long to learn php, last Xin brother to help me with the environment, learning a few days. . . This time they are worthy of a moment, for the first time or have trouble with, for the experience of friends to help me solve many problems, the following

  • ROR VIM development environment for Windows, built 2010-11-29

    1.Ruby, RubyGems, Rails ROR is the reference version of "Agile Web Development with Rails 3rd" [1] Ruby 1.8.7, download Ruby , EXE to install on the line [2] RubyGems 1.3.7, the latest version now, download the ZIP , extract, ruby setup.rb [3] R

  • In the window under the django development environment to build 2011-05-31

    Download and install the python-2.7.1.msi, installation. Downloaded Django-1.3.tar.gz, extract, run enter cmd, cd to the Django directory. The book said that I run python setup.py install python is not configured in the path of (I do not know how to

  • Mobile Development How to build Android development environment under Windows 2010-08-11

    http://blog.csdn.net/Mac_cm/archive/2009/01/06/3720492.aspx

  • Flex4.0 and AIR2.0 development environment configuration 2010-06-21

    Configuration AIR2.0 Development Environment Before configuring the development environment, first download and install AIR2.0 the run-time, download the following address: http://download.macromedia.com/pub/labs/air/2/b1/air2_b1_runtime_win_111709.e

  • AIX development environment introduced 2010-11-04

    AIX development environment introduced With the IBM pSeries server market share continues to increase, AIX operating system for the IT industry more and more loved. AIX UNIX family as a good one, has a rich development environment, AIX latest version

  • Ruby on windows at the eclipse development environment to build 2009-04-18

    Learn a language, I think most should know is how to build such a language runtime environment. If the language of the operating environment we know, and then find the line with the past to develop the habit of IDE tools, and then take a look at the

  • php development environment set up (windows) 2010-02-24

    Today spent more than an hour under the windows development environment php build well, as follows Download apache server, I used version is 2.2.3, the following documents apache_2.2.3-win32-x86-no_ssl.msi, Download ( http://archive.apache.org/dist/h

  • NetBeans6.8 configuration C / C + + development environment (Windows) 2010-03-28

    Recent study C, VC + + was found too inflexible, and mostly spent too much time writing code. Has been used for Eclipse, a lot of keyboard shortcuts, all of a sudden everything by hand, not used to. Previously been configured in the Eclipse C / C + +