Book Image

Python Tools for Visual Studio

Book Image

Python Tools for Visual Studio

Overview of this book

Table of Contents (13 chapters)

Django project template and tools


Let's take a look at Django-related tools and templates available in PTVS, starting with the Django project template. Project templates in Visual Studio are boilerplate helpers that create a project's outline based on the specific type of the project. To start a new Django project, open the New Project window under the File menu. Once it's open, select Python from the list on the left-hand side. This displays the installed project types available in the system. Here is what the window looks like:

Click on the Django Project option in the right-hand panel to define the project name in the bottom of the window. We perform this action while specifying where the file should be saved. You can also define the solution name for the Visual Studio solution for the project. Once these properties are defined, clicking on OK creates the Django project.

Example default Django project structure shown in Solution Explorer

Installing a Python package

The basic Django project...