Best practices for using a virtual environment for web development with Django?

These are Django and Python and maybe just a common web development issue.

what is the difference between using virtualenv vs vagrant vs virtual box etc ??

I'm a little confused when to use which: / I use virtual env all the time and create new virtual environments for different projects .... Is this correct? One virtual project per project?

I'm not quite sure when and where the tramp enters the game ... Should I set up the tramp and then use virtualenv?

This is probably a stupid question, but ... if I worked on this project with other people. Should they also create virtual env? Just collaborate?

Wouldn't it make more sense that we all work on our local machines and then insert it into the main branch? I'm just confused ... I feel like I'm doing everything wrong ...

Thanks for all the answers!

+5
source share
3 answers

Virtualenv creates a local sandbox for installing Python modules.

Vagrant is an automation tool for creating virtual machines.

VirtualBox is a free, open source environment for running virtual machines, such as those created by Vagrant.

Virtualenv , . Vagrant . , , , , .

, - Django, , pip . txt, Vagrant, .

, . - .

+8

Virtualenv - python, , . Python , , " ".

Virtualbox - , .

Vagrant.

, , - virtualenv. virtualenv ( !) , virtualenv , , . virtualenv pip install , Django.

, , pip freeze > requirements.txt require.txt, , .

, virtualenv, pip install -r requirements.txt . require.txt, , pip install -r requirements.txt , .

, virtualenv , , , Django 1.4, , Django 1.5, .

Virtualenv - , python, , , .

+5

virtualenv Ubuntu. :

  • virtualenv Python .
  • Ubuntu dekstop Python , , Ubuntu. , . , Windows Linux .
+1

All Articles