Introduction to Python development and combat 9-integrated development environment based on VS

Source: Internet
Author: User
Tags django server

9. Visual Studio-based Python's integrated development environment

In the previous chapter we described how to install an integrated development environment using Java Eclipse IDE, this chapter describes another integrated development environment, but also the author's many years of development habits to use the environment, and for this reason, the following chapter description will be described in this chapter of the integrated development environment as an example.

Microsoft's Visual Studio family: an integrated development environment that is widely used in the country. The version we chose here is the Community 2013 version. Since Visual Studio also has a Python-enabled development plugin, I quickly re-moved to the Visual Studio development platform.

9.1. Install Visual Studio Community

Free version of: HTTP://WWW.VISUALSTUDIO.COM/ZH-CN

Download the visual Studio Community version, or you can download the offline installation package for installation. The installation interface is as follows:

9.2. Install the Python Tools for Visual Studio plug-in

After the installation completes vs_community we also need to install a Python plug-in PTVs, detailed follow instructions please consult PTVs installation instructions, here we choose PTVs 2.1 VS 2013.msi version.

After the installation is complete PTVs, we examine the Python environment in the IDE, and then we can create the Django project.

9.3. Create a Django Web Project

For example, here we choose Blank Django WEB Project Project type, is the expanded directory structure, vs added itself to manage files and directories, structure and files are consistent.

Inventory App Migration We can add an Djiango app named Inventory to the project as Eclipse.

Similarly, copy the files from the inventory directory to the new project inventory, overwrite the new directory, vs generated app template directory default name is "Templates", change the directory forms name. Create a new SQLite3 database file named Mydb.db with the data tool, modify settings.py and urls.py as in the previous chapter. We call the Validate Django app to confirm that the configuration is correct.

After the Django Sync DB command is called, we can run our program. Such as:

9.4. Run the MySite project

In addition, we can run the project through the IDE's Run command, and the IDE will automatically access the Web site when the Django server is started, such as:

9.5. Switching console environment

From the menu above, we can go directly to the Django Shell Command Interactive environment where we can directly execute the Django command, many times can greatly improve the development efficiency.

9.6. Summary

Visual Studio community, as a version of the community developer, features a lot of support, including cloud-based Team Foundation Server Management, supporting a small team of 5 people to manage the development process and source code, which will be mentioned in later chapters. As a development environment that I have been using for many years, vs support Python does bring a lot of convenience.

Introduction to Python development and combat 9-integrated development environment based on VS

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.