How to update django in visual studio?

0

Hello, I have all installed version 2.0.2 of django and it works fine, but I have noticed that when creating a project with visual studio, version 1.9 appears, I am very confused and I would also like to develop a project created with cmd in visual study how complicated is it? I usually run my project with python manage.py runserver as indicated in the documentation but many speak of virtualenv which confuses me more, what do you recommend?

    
asked by Daniel Treviño 02.02.2018 в 04:11
source

1 answer

2

In Visual Studio it's very easy, since it simplifies everything.

I recommend you download Visual Studio Community

A virtualenv or virtual environment of Python is an environment created with the aim of isolating resources such as libraries and execution environment, from the main system or from other virtual environments.

1.-Visual Studio creates the virtualEnv and installs Django (Installs the most current version) when the Virtual Environment is created.

2.-If you require another version of Django you can go directly to install it from the Visual Studio package installer.

3.-Automatically creates some default templates for you to start with your project, the project includes a Log In

In the image 5 is the example to update Django, select pip install Django == 1.8 from PyPi and start downloading and replace the version you have, if you want Django 2.0.2 you put Django == 1.8 and the installer will show "pip install Django == 1.8" from PyPi, as long as the structure of your project is based on the same structure that Visual Studio generates.

Image 6 shows the commands to make the migrations, or you can do it from the console that Visual Studio gives you.

python manage.py migrate
python manage.py makemigrations nombre-de-app
    
answered by 02.02.2018 / 04:50
source