Managing vagrant and different venvs

So in the process of setting up the Lending venv to look precisely like yours does in the video, I somehow deleted blog-venv.

Obviously this was pretty dumb..I'm still not entirely sure how it happened, but I did wind up running vagrant destroy -- vagrant up -- vagrant destroy and changing some settings a few times in the process.

This leads me to two questions:

1) How are you managing vagrant when you close your terminal and start it back up? Do you halt, suspend? do you ever destroy? I thought i had used destroy before without having to reinstall the whole thing over ~20 minutes but perhaps I'm misremembering.

2) Why is it necessary to create the second venv? I realize the name is a bit off (blog-venv...), but couldn't we just create the separate project files and use the same venv? What's the real benefit here?

Sorry You must be a logged in, registered user to answer a question.

Answers

If you want your Vagrant setup to be persistent then you have to either halt or suspend it. These methods keep an image of your virtual machine on your HD. Destroying it erases all your custom data and the VM gets rebuilt from scratch upon vaggrant up.

The whole point of virtualenv is that each project you create has it's own bubble to live with it's own dependencies in. The blog tutorial was created in django 1.4 and the lending one is done in django 1.5. Which illustrates exactly what virtualenv is for. Also, they introduce new packages in the lending project that are not used in the blog.

The whole virualenv, VM setup is so that you create an uncontaminated environment to code in so if something goes wrong it is easier to find out what happend.