mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-22 16:01:48 -05:00
AC-752 Update settings to support enabling celeryd using rabbitmq on upgrade, also support config files in /etc/awx/conf.d/.
This commit is contained in:
@@ -2,21 +2,25 @@
|
||||
# All Rights Reserved.
|
||||
|
||||
# Development settings for AWX project.
|
||||
|
||||
# Python
|
||||
import sys
|
||||
import traceback
|
||||
|
||||
# Django Split Settings
|
||||
from split_settings.tools import optional, include
|
||||
|
||||
# Load default settings.
|
||||
from defaults import *
|
||||
|
||||
# If a local_settings.py file is present in awx/settings/, use it to override
|
||||
# If any local_*.py files are present in awx/settings/, use them to override
|
||||
# default settings for development. If not present, we can still run using
|
||||
# only the defaults.
|
||||
try:
|
||||
local_settings_file = os.path.join(os.path.dirname(__file__),
|
||||
'local_settings.py')
|
||||
execfile(local_settings_file)
|
||||
# Hack so that the autoreload will detect changes to local_settings.py.
|
||||
class dummymodule(str):
|
||||
__file__ = property(lambda self: self)
|
||||
sys.modules['local_settings'] = dummymodule(local_settings_file)
|
||||
except IOError, e:
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
if os.path.exists(local_settings_file):
|
||||
msg = 'Unable to load %s: %s' % (local_settings_file, str(e))
|
||||
raise ImproperlyConfigured(msg)
|
||||
include(
|
||||
optional('local_*.py'),
|
||||
scope=locals(),
|
||||
)
|
||||
except ImportError:
|
||||
traceback.print_exc()
|
||||
sys.exit(1)
|
||||
|
||||
Reference in New Issue
Block a user