Django with Python Tools 2.2 for Visual Studio (PTVS 2.2)

What is Python Tools 2.2 for Visual Studio?

This is the version released in 2015. It is a plug-in for adding the function as an IDE of Python on Visual Studio. PTVS can be used not only for web applications but also for standalone Python application development. (Reference)

Run Django 1.8 in Visual Studio 2015

You can use PTVS to link Django with databases on Azure. For now, let Visual Studio 2015 run Django 1.8 on Windows.

Installing Visual Studio 2015 Community

Install Visual Studio 2015 Community on Windows (https://www.visualstudio.com/en/downloads/). 1.png Python Tools 2.2 for Visual Studio Please install PTVS at here. Rumor has it that it is included as standard in VS2015. 2.png

Create a Django project in Visual Studio 2015

Run Visual Studio and 【Start】➡️【New Project...】➡️【Python/Web】➡️【Django Web Project】 Give a Name and click [OK] to create a project. 3.png

Then, it will be as below, so if there is no particular change, [Create]. 4.png

The last time you run it, Firefox will run and the Django screen will open. 5.png

Error

  1. When I execute it after Create, I get an error ** cannot import name patterns ** and cannot execute it. ➡️ Installing patterns with pip doesn't work, so I looked it up and found that the default Django version is Django 1.10, so it didn't work!

Therefore, select [env (right-click)] ➡️ [Install Python Package ..] and select Entering ** django == 1.8 ** (Linux: pip install django == 1.8) in parentheses will uninstall Django 1.10 and reinstall Django 1.8 again. スクリーンショット 2016-10-07 13.38.50.png

Recommended Posts

Django with Python Tools 2.2 for Visual Studio (PTVS 2.2)
Python Tools for Visual Studio Installation Guide
Build Python3 for Windows 10 on ARM with Visual Studio 2019 (x86) on Windows 10 on ARM
Django 1.11 started with Python3.6
Build Python development environment with Visual Studio Code
Refactoring tools for Python
Settings for Python coding in Visual Studio Code
[Visual Studio Code] [Python] Tasks.json + problemMatcher settings for Python
Steps to put dlib in Python Tools for Visual Studio and have fun
I customized it with Visual Studio Code (mainly for python), so I will summarize it
Try debugging Python on Raspberry Pi with Visual Studio.
Summary of tools for operating Windows GUI with Python
Make Visual Studio Code autocomplete for python external libraries
Python development environment with Windows + Anaconda3 + Visual Studio Code
Python development environment with Windows + Python + PipEnv + Visual Studio Code
Japanese output when dealing with python in visual studio
AWS SDK for Python (Boto3) development in Visual Studio 2017
Do Django with CodeStar (Python3.8, Django2.1.15)
Python3 + Django ~ Mac ~ with Apache
Getting Started with Python Django (1)
Getting Started with Python Django (4)
Getting Started with Python Django (3)
Python development in Visual Studio 2017
Getting Started with Python Django (6)
Remote debugging with Visual Studio 2017
Python development in Visual Studio
Getting Started with Python Django (5)
Execute C ++ functions from Python with Pybind11 (for Windows & Visual Studio Code people) Debugging
Set up a Python development environment with Visual Studio Code
Enable the virtualenv Python virtual environment for Visual Studio Code
Recommendations for django, wagtail ~ Why develop a website with python ~
[Python] Create a screen for HTTP status code 403/404/500 with Django
Execute C ++ functions from Python with Pybind11 (for Windows & Visual Studio Code people) Environment construction
Java with Visual Studio Code (Part 2)
Getting Started with Python for PHPer-Classes
Run python3 Django1.9 with mod_wsgi (deploy)
Commands for creating SNS with Django
Getting Started with Python for PHPer-Functions
Try to create a python environment with Visual Studio Code & WSL
A memo for those who use Python in Visual Studio (me)
Installation of Visual studio code and installation of python
Easy keyword extraction with TermExtract for Python
INSERT into MySQL with Python [For beginners]
WEB scraping with Python (for personal notes)
Manually ssh registration for coreserver with python
Use DeepL with python (for dissertation translation)
Amplify images for machine learning with python
Use Jupyter Notebook with Visual Studio Code on Windows 10 + Python + Poetry + pyenv-win
Tips for dealing with binaries in Python
Tips for using python + caffe with TSUBAME
[Shakyo] Encounter with Python for machine learning
CentOS 6.4 with Python 2.7.3 with Apache with mod_wsgi and Django
Process multiple lists with for in Python
Application development using SQLite with Django (PTVS)
Getting Started with Python for PHPer-Super Basics
Build an environment to execute C ++ functions from Python with Pybind11 (for Windows & Visual Studio Code people)
Debug for mysql connection with python mysql.connector
[Python] Read images with OpenCV (for beginners)
WebApi creation with Python (CRUD creation) For beginners
Tips for making small tools in python
Run Python in C ++ on Visual Studio 2017