Reputation: 456
With Django, Is it better to have a virtualenv created at project level.
Or,
is it better to have a virtualenv per app within a single project?
Upvotes: 1
Views: 73
Reputation: 5857
All the apps installed (INSTALLED_APPS) within a single project run under the same python process, so it's going to be one virtualenv for all apps.
If you have an app that requires a specific python environment and the others really aren't able to run in that environment (for example, if one app requires python3 and another requires python2), then you would have to run the problem app in its own Django application server instance.
Since normally you would have nginx or Apache in front of your Django instance, you could have multiple Django instances appear to be one server. But it's a situation you'd want to avoid.
Upvotes: 5