Hyperion Hyperion - 1 year ago 140
Python Question

Django startproject doesn't create folder in virtualenv

I'm following the tutorial at http://djangobook.com/installing-django/ to setup Django. I created a new virtualenv and installed Django in it. I activate it through:

source env_mysite/bin/activate

After this I see (env_mysite) before my computer name in my terminal. Then I run

django-admin startproject mysite

And here the tutorial says:

This will create a mysite directory in your current directory (in this
case \env_mysite).

But my folder get created in my user root folder, not in my env_mysite folder. Why this is happening?

Answer Source

You don't need to create a project in venv folder (actually, you better not). You need virtual environment only to 'communicate' with you project via terminal (starting, migrating...) Virtual environment contains needed tools to run you project (your project is not a part of it).

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download