2012-08-28 18:45:35 +02:00
|
|
|
#!/usr/bin/env python
|
|
|
|
import os
|
|
|
|
import sys
|
2013-11-19 00:04:45 +01:00
|
|
|
import logging
|
|
|
|
import subprocess
|
2012-08-28 18:45:35 +02:00
|
|
|
|
|
|
|
if __name__ == "__main__":
|
2015-10-02 21:06:12 +02:00
|
|
|
if 'posix' in os.name and os.geteuid() == 0:
|
|
|
|
from django.core.management.base import CommandError
|
|
|
|
raise CommandError("manage.py should not be run as root.")
|
2013-11-19 00:04:45 +01:00
|
|
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "zproject.settings")
|
|
|
|
|
|
|
|
from django.conf import settings
|
|
|
|
|
|
|
|
logger = logging.getLogger("zulip.management")
|
|
|
|
subprocess.check_call([os.path.join(os.path.dirname(__file__), "bin", "log-management-command"),
|
|
|
|
" ".join(sys.argv)])
|
2013-05-22 21:18:45 +02:00
|
|
|
|
|
|
|
if "--no-traceback" not in sys.argv and len(sys.argv) > 1:
|
|
|
|
sys.argv.append("--traceback")
|
|
|
|
|
2012-08-28 18:45:35 +02:00
|
|
|
from django.core.management import execute_from_command_line
|
|
|
|
|
|
|
|
execute_from_command_line(sys.argv)
|