mirror of
https://github.com/zulip/zulip.git
synced 2025-10-31 20:13:46 +00:00
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:
committed by
Tim Abbott
parent
64affb83f9
commit
a9835c0ab2
@@ -2,7 +2,12 @@
|
||||
import sys
|
||||
import logging
|
||||
import os
|
||||
sys.path.append(os.path.join(os.path.dirname(__file__), "..", ".."))
|
||||
from os.path import dirname, abspath
|
||||
|
||||
BASE_DIR = dirname(dirname(dirname(abspath(__file__))))
|
||||
sys.path.append(BASE_DIR)
|
||||
import scripts.lib.setup_path_on_import
|
||||
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "zproject.settings")
|
||||
from django.conf import settings
|
||||
|
||||
|
||||
Reference in New Issue
Block a user