Question

What is the point of 1-click Django install if I'm using a virtualenv

I used the 1-click Django install for my droplet. I am trying to migrate over my local project which is contained within a virtualenv. I just created a new virtualenv in my droplet, and now I’m realizing that I need to (again) install Django and all the rest of my dependancies inside the virtualenv. I’m confused about a couple things, and not sure if I’m doing this right. My first question is since I need to install django 1.6 (and all my dependancies) in my virtualenv, was the only benefit of doing the 1-click install (in my case), really just that it installed Ubuntu and Postgres?

Another question I have is do I NEED to use a virtualenv on my droplet? I’m only going to have one Django project on this droplet so I don’t think I need to isolate anything, The only reason I created a virtualenv on my droplet is because I’m used to working within a virtualenv on my local machine, and I would know exactly where to place all my files and dependancies that I’m migrating over. For example in the virtualenv I have lib, bin, ect. I know where to put those in my droplet as long as I have a virtualenv. Without the virtualenv, I would have no idea where to put my Django project (does it matter?) and most importantly all my dependancies (which I have locally modified) so I cannot just install them using pip, I have to actually move them over and place them in the correct directory, the problem is I don’t know where.


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Thanks for your answer, that makes sense. So if I decide not to use a virtualenv in my droplet, would my dependancies be installed under usr/local/lib/site-packages? If I pip install something is that where it shoud be?

If you are using a virtualenv, there are still some potential benefits to using the one-click image. Mainly, it would be spinning up a development environment with the tools you need preinstalled. Python, Postgres, pip, and virtualenv are all on there as well as Nginx to serve as a reverse proxy. If you haven’t seen it yet, check out this tutorial to get a better idea of what it has:

That said, if you already have an idea of the way you want to build out your app, you might be better off starting in a clean Ubuntu environment. Some people love using it to get quickly started at a hackathon or for testing and development, and then grow to a more complex setup with their database on a separate node. The main idea of the one-click is to give you a platform to build on with the tools you need already there.