Settings and configuration for Trigger.
Values will be read from the module specified by the TRIGGER_SETTINGS environment variable, and then from trigger.conf.global_settings; see the global settings file for a list of all possible variables.
If TRIGGER_SETTINGS is not set, it will attempt to load from /etc/trigger/settings.py and complains if it can’t. The primary public interface for this module is the settings variable, which is a module object containing the variables found in settings.py.
>>> from trigger.conf import settings
>>> settings.FIREWALL_DIR
'/data/firewalls'
>>> settings.REDIS_HOST
'127.0.0.1'
Emulates settings and returns empty strings on attribute gets.
Import a file with full path specification. Allows one to import from anywhere, something __import__ does not do.
Also adds the module to sys.modules as module_name
Parameters: |
|
---|
Returns a module object.
Common logic for settings whether set by a module or by the user.