Python Installation Install Python + pyqt + Eric on Windows. For more information, see install Python + pyqt + Eric on Linux or Mac OS X.
Http://www.python.org/download/ Django Installation Official release version installation
Most people will consider downloading the latest official release from the http://www.djangoproject.com/download. Django uses the python StandardDistutilsThe installation method may include the following steps on the Linux platform:
Download the tar installation package. The file name may beDjango-0.96.tar.gz.
Tar Xzvf Django-* .tar.gz.
CD Django -*.
Sudo Python Setup. py Install.
On Windows, we recommend that you use7-zipTo process compressed files in various formats, including the. tar.gz format. 7-zip can be downloaded from http://www.djangoproject.com/r/7zip.
Switch to another directory and startPython. If everything is ready, you can importDjangoModule:
>>> Import Django
>>> Django. Version
(0, 96, none)
Install Django through subversion
If you want to experience new features with certain risks or contribute to DjangoCodeYou should download and install Django from the subverion repository.
Subversion is a free open-source version control system similar to CVS. The Django development team uses it to manage updates to the Django code base. You can use the Subversion client to obtain the latest DjangoSource codeAnd can be used at any timeLocal checkoutUpdate the version of the local Django code to obtain the latest updates and improvements made by the Django developer.
The latest and best Django code is usually called * trunk (trunk )*. The Django development team uses the trunk code to run the product-level site and fully ensures its stability.
Installation steps:
Make sure that the Subversion client is installed. You can download this software from http://subversion.tigris.org/free and get outstanding documentation from http://svnbook.red-bean.com.
UseSVN CO Http://code.djangoproject.com/svn/django/trunk DjtrunkCommand to check out mainstream code.
CreateSite-packages/Django. PTHAnd setDjtrunkDirectory to add or updatePythonpathSet and point itDjtrunk.
SetDjtrunk/Django/binAdd it to the system variable path. This directory contains some imagesDjango-admin.pyAnd other management tools.
Tip:
If you have never touched. PTHFile, you can get more related knowledge from http://www.djangoproject.com/r/python/site-module.
After downloading from subversion and performing the preceding steps, you do not need to execute it again.Python Setup. py InstallYou have already manually installed it!
Because the updates to Django's main code often include bug fixes and feature additions, if you are really fascinated, you may want to update it every short time. InDjtrunkRun in DirectorySVN UpdateCommand to update. When you use this command, subversion will contact the http://code.djangoproject.com to determine whether the code is updated, and then apply all the changes since the last update to the local code. That's simple.
Install Database
1. PostgreSQL
Official Website: (http://www.postgresql.org /)
: Windows platform http://www.djangoproject.com/r/python-pgsql/windows/.
2. SQLite 3
Official Website: (http://www.sqlite.org /)
: Http://www.djangoproject.com/r/python-sqlite/
3. MySQL
Official Website: (http://www.mysql.com /)
: Http://www.djangoproject.com/r/python-mysql/
4. SQL Server and Oracle
Trying to make it support SQL Server and Oracle
First test project
1. CreateMysiteDirectory
RunDjango-admin.py Startproject Mysite
Let's take a lookStartprojectWhat are created:
Mysite/_ init _. py manage. py settings. py URLs. py
File description:
2. Development Server
RunPython Manage. py RunserverCommand
Output:
Validating models... 0 errors found. Django Version 1.0, using settings 'mysite. setting' development server is running at http: // 127.0.0.1: 8000/quit the server with lhj588-pc.
Change host or port
By default,RunserverThe command starts the development server on port 8000 and only listens to local connections. To change the server port, you can pass the port as a command line parameter:
Python manage. py runserver 8080
You can also change the IP address of a server listener. This feature is particularly useful if you want to share the same development site with other developers. The following command:
Python manage. py runserver 0.0.0.0: 8080
use a web browser to access http: // 127.0.0.1: 8000/