[Django]-What is "workon" when using the Django framework?

5👍

workon project_a means that you switch the the virtual environment project_a. In other words, when you type python or python manage.py you have access to the project_a libraries.

Is it true that when using virtualenv, then you need to activate or deactivate, and so forth, but if you install and use virtualenvwrapper, then you don’t have to do all that and can just create environments and use workon to switch?

Yes. Roughly, workon project_b is the same than:

deactivate
source project_b/venv/path/bin/activate

3👍

virtualenvwrapper is a package providing shortcuts for working with virtualenv, such as workon, mkvirtualenv, and others. This has nothing to do with django, but is commonly used alongside it. The docs are here:

https://virtualenvwrapper.readthedocs.org/en/latest/

👤Greg

Leave a comment