Commit e7bb0d7b3994aba062f58139998fc8b528fa6b7e

Authored by Sergio Oliveira
1 parent 271a5cea

Set COLAB_SETTINGS default only in one place

colab/management/__init__.py
@@ -11,7 +11,6 @@ def execute_from_command_line(argv=None): @@ -11,7 +11,6 @@ def execute_from_command_line(argv=None):
11 A simple method that runs a ManagementUtility. 11 A simple method that runs a ManagementUtility.
12 """ 12 """
13 os.environ.setdefault("DJANGO_SETTINGS_MODULE", "colab.settings") 13 os.environ.setdefault("DJANGO_SETTINGS_MODULE", "colab.settings")
14 - os.environ.setdefault("COLAB_SETTINGS", "/etc/colab/settings.yaml")  
15 14
16 utility = ManagementUtility(argv) 15 utility = ManagementUtility(argv)
17 utility.execute() 16 utility.execute()
colab/utils/conf.py
@@ -12,7 +12,7 @@ class InaccessibleYAMLSettings(ImproperlyConfigured): @@ -12,7 +12,7 @@ class InaccessibleYAMLSettings(ImproperlyConfigured):
12 12
13 13
14 def load_yaml_settings(): 14 def load_yaml_settings():
15 - yaml_path = os.getenv('COLAB_SETTINGS', '/etc/colab.yaml') 15 + yaml_path = os.getenv('COLAB_SETTINGS', '/etc/colab/settings.yaml')
16 16
17 if not os.path.exists(yaml_path): 17 if not os.path.exists(yaml_path):
18 msg = "The yaml file {} does not exist".format(yaml_path) 18 msg = "The yaml file {} does not exist".format(yaml_path)
@@ -9,7 +9,6 @@ https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/ @@ -9,7 +9,6 @@ https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/
9 9
10 import os 10 import os
11 os.environ.setdefault("DJANGO_SETTINGS_MODULE", "colab.settings") 11 os.environ.setdefault("DJANGO_SETTINGS_MODULE", "colab.settings")
12 -os.environ.setdefault("COLAB_SETTINGS", "/etc/colab/settings.yaml")  
13 12
14 from django.core.wsgi import get_wsgi_application 13 from django.core.wsgi import get_wsgi_application
15 application = get_wsgi_application() 14 application = get_wsgi_application()