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:
Anders Kaseorg 2019-07-03 14:34:33 -07:00 committed by Tim Abbott
parent 0a08fdd072
commit 1868e96850
1 changed files with 1 additions and 10 deletions

View File

@ -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/'