9👍
✅
virtualenv package will help:
virtualenv is a tool to create isolated Python environments.
It’s somewhat tricky to activate virtualenv in the wsgi
file, but there is a lot of info on the subject out there:
3👍
Yes, use virtualenv, and in your wsgi script add this:
import os, sys
sys.path.insert(0, '/path/to/mysite') #where your site is
activate_this = '/path/to/djangoenv/bin/activate_this.py' #virtualenv with proper Django version
execfile(activate_this, dict(__file__=activate_this))
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
- [Django]-Django Tastypie User Objects Only Authorization
- [Django]-ModuleNotFoundError: No module named 'debug_toolbar' Django 3.1
- [Django]-Implementing a SOA in Django using celery
- [Django]-Django rest framework custom Response middleware
Source:stackexchange.com