Activate virtualenv in production Python code.

The manage.py change effectively switches the Zulip production server
to use the virtualenv, since all of our supervisord commands for the
various Python services go through manage.py.

Additionally, this migrates the production scripts and Nagios plugins
to use the virtualenv as well.
This commit is contained in:
Eklavya Sharma
2016-06-25 20:37:13 +05:30
committed by Tim Abbott
parent 64affb83f9
commit a9835c0ab2
14 changed files with 86 additions and 7 deletions

View File

@@ -14,6 +14,12 @@ framework.
"""
import os
from os.path import dirname, abspath
import sys
BASE_DIR = dirname(dirname(abspath(__file__)))
sys.path.append(BASE_DIR)
import scripts.lib.setup_path_on_import
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "zproject.settings")