From e7bb0d7b3994aba062f58139998fc8b528fa6b7e Mon Sep 17 00:00:00 2001 From: Sergio Oliveira Date: Mon, 3 Nov 2014 19:56:06 -0200 Subject: [PATCH] Set COLAB_SETTINGS default only in one place --- colab/management/__init__.py | 1 - colab/utils/conf.py | 2 +- colab/wsgi.py | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/colab/management/__init__.py b/colab/management/__init__.py index 4cf47b4..a7b3a66 100644 --- a/colab/management/__init__.py +++ b/colab/management/__init__.py @@ -11,7 +11,6 @@ def execute_from_command_line(argv=None): A simple method that runs a ManagementUtility. """ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "colab.settings") - os.environ.setdefault("COLAB_SETTINGS", "/etc/colab/settings.yaml") utility = ManagementUtility(argv) utility.execute() diff --git a/colab/utils/conf.py b/colab/utils/conf.py index 2ff03db..94c3338 100644 --- a/colab/utils/conf.py +++ b/colab/utils/conf.py @@ -12,7 +12,7 @@ class InaccessibleYAMLSettings(ImproperlyConfigured): def load_yaml_settings(): - yaml_path = os.getenv('COLAB_SETTINGS', '/etc/colab.yaml') + yaml_path = os.getenv('COLAB_SETTINGS', '/etc/colab/settings.yaml') if not os.path.exists(yaml_path): msg = "The yaml file {} does not exist".format(yaml_path) diff --git a/colab/wsgi.py b/colab/wsgi.py index dd027b4..02679ab 100644 --- a/colab/wsgi.py +++ b/colab/wsgi.py @@ -9,7 +9,6 @@ https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "colab.settings") -os.environ.setdefault("COLAB_SETTINGS", "/etc/colab/settings.yaml") from django.core.wsgi import get_wsgi_application application = get_wsgi_application() -- libgit2 0.21.2