mirror of https://github.com/zulip/zulip.git
tools/webpack: Don’t import Django.
It added about 150ms to the startup time of running webpack, for no benefit. Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
parent
0a08fdd072
commit
1868e96850
|
@ -2,22 +2,13 @@
|
|||
|
||||
import argparse
|
||||
import os
|
||||
import sys
|
||||
import json
|
||||
import subprocess
|
||||
|
||||
if False:
|
||||
from typing import NoReturn
|
||||
|
||||
# check for the venv
|
||||
from lib import sanity_check
|
||||
sanity_check.check_venv(__file__)
|
||||
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
|
||||
os.environ['DJANGO_SETTINGS_MODULE'] = 'zproject.settings'
|
||||
from django.conf import settings
|
||||
|
||||
os.chdir(settings.DEPLOY_ROOT)
|
||||
os.chdir(os.path.join(os.path.dirname(__file__), '..'))
|
||||
STATIC_PATH = 'static/'
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue