Question

I installed virtualenvwrapper on ubuntu. I added the following lines to the top of bashrc file:

export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/myprojects
source /usr/local/bin/virtualenvwrapper.sh

everething works perfect except that when I use django-admin start project command, the project gets created in my home directory not the directory I specified in bashrc file which is myprojects. shouldn't new projects be created in myprojects folder? thanks in advance.

Était-ce utile?

La solution

I assume you're running django-admin startproject in your home folder? django-admin doesn't know anything about virtualenvwrapper and, unless you explicitly specify a folder, it creates the project in the current folder. See https://docs.djangoproject.com/en/dev/ref/django-admin/#startproject-projectname-destination

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top