Installation of Python and Django in window environment, and creation of projects

Source: Internet
Author: User
Tags install django

1. First we want to download Python and Django, and they are as follows

Python Address: https://www.python.org/

Django Address: https://www.djangoproject.com/

2. Install the Python environment first before you install Django.

A. After downloading the Python installation package, click Next (Next)

B. Configuring Python environment variables

C. Test whether the Python installation was successful, cmd open command line Input python command, if that is successful

3. Start installing Django and we'll use cmd when we install Django. Under the cmd Command window, go to the Django decompression directory with the CD command and locate the setup.py file.

4. Install Django using the Python setup.py installation. Wait for the installation to complete.

5. After the installation is complete, check that there are no errors.

6. Run Python, import Django,import Django and django.version to see if there is a successful installation. If there is a successful installation, the version will be displayed.

7. Configure the Django environment variable, C:\Python27\Lib\site-packages\Django-1.7.11-py2.7.egg\django\bin path, to invoke when executing django-admin.py ( Personal understanding )

8. Create the project. The command is django-admin.py startproject ProjectName projectname is the project name (not executed on the Python command line). This article was built under the F-plate

For example:

9. When the project is created successfully, the directory structure

start the built-in service: You need to enter it under the project folder: Python manage.py runserver. As

11. Verify that if you enter http://127.0.0.1:8000/in the browser, you can see the.

The first Python + Django development environment is ready to run.

Legacy issues?

1. Each time you create a project port number is 8000, how to set the port number, how to shut down the running port number?

Installation of Python and Django in window environment, and creation of projects

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.