summaryrefslogtreecommitdiffstats
path: root/manage.py
diff options
context:
space:
mode:
authorJérôme Schneider <jschneider@entrouvert.com>2015-02-09 14:03:45 (GMT)
committerJérôme Schneider <jschneider@entrouvert.com>2015-02-09 14:55:38 (GMT)
commit4d9e15a0d9ef117870e4d075d283ccfa3f1d1ef5 (patch)
treef3ff0dfd70e20002f1e52bb5e792714e2aba30c2 /manage.py
parentddc96a9b4251f0a316d7ec4a3e5a2dd6c2f87cdc (diff)
downloadhobo-4d9e15a0d9ef117870e4d075d283ccfa3f1d1ef5.zip
hobo-4d9e15a0d9ef117870e4d075d283ccfa3f1d1ef5.tar.gz
hobo-4d9e15a0d9ef117870e4d075d283ccfa3f1d1ef5.tar.bz2
settings: use a single settings.py file
use just HOBO_SETTINGS_FILE variable environment to set the configuration file Closes #6454
Diffstat (limited to 'manage.py')
-rwxr-xr-xmanage.py28
1 files changed, 2 insertions, 26 deletions
diff --git a/manage.py b/manage.py
index b103685..c84d3a0 100755
--- a/manage.py
+++ b/manage.py
@@ -3,32 +3,8 @@ import os
import sys
if __name__ == "__main__":
- multitenant = False
- config_file = False
-
- argv = sys.argv[1:]
- for arg in list(argv):
- if arg.startswith('--'):
- if arg.startswith('--config='):
- config_file = arg.split('=')[1]
- argv.pop(0)
- elif arg == '--multitenant':
- multitenant = True
- argv.pop(0)
- else:
- print >>sys.stderr, 'ERR: Unsupported flag', arg
- sys.exit(1)
- else:
- break
-
- if config_file:
- os.environ['DJANGO_CONFIG_FILE'] = config_file
-
- if multitenant:
- os.environ.setdefault("DJANGO_SETTINGS_MODULE", "hobo.tenant_settings")
- else:
- os.environ.setdefault("DJANGO_SETTINGS_MODULE", "hobo.settings")
+ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "hobo.settings")
from django.core.management import execute_from_command_line
- execute_from_command_line(sys.argv[:1] + argv)
+ execute_from_command_line(sys.argv)