diff --git a/netbox/netbox/configuration.example.py b/netbox/netbox/configuration.example.py index be3c8f230..b1a7e944f 100644 --- a/netbox/netbox/configuration.example.py +++ b/netbox/netbox/configuration.example.py @@ -4,10 +4,14 @@ # # ######################### +# Set this to your server's FQDN. This is required when DEBUG = False. +# E.g. ALLOWED_HOSTS = ['netbox.yourdomain.com'] +ALLOWED_HOSTS = [] + # PostgreSQL database configuration. DATABASE = { 'NAME': 'netbox', # Database name - 'USER': 'netbox', # PostgreSQL username + 'USER': '', # PostgreSQL username 'PASSWORD': '', # PostgreSQL password 'HOST': 'localhost', # Database server 'PORT': '', # Database port (leave blank for default) @@ -19,10 +23,6 @@ DATABASE = { # https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-SECRET_KEY SECRET_KEY = '' -# Set this to your server's FQDN. This is required when DEBUG = False. -# E.g. ALLOWED_HOSTS = ['netbox.yourdomain.com'] -ALLOWED_HOSTS = [] - ######################### # # @@ -30,19 +30,27 @@ ALLOWED_HOSTS = [] # # ######################### -# Time zone (default: UTC) -TIME_ZONE = 'UTC' +# Email settings +EMAIL = { + 'SERVER': 'localhost', + 'USERNAME': '', + 'PASSWORD': '', +} +SERVER_EMAIL = 'netbox@digitalocean.com' # Setting this to True will permit only authenticated users to access any part of NetBox. By default, anonymous users # are permitted to access most data in NetBox (excluding secrets) but not make any changes. LOGIN_REQUIRED = False -# Determine how many objects to display per page within a list. (Default: 50) -PAGINATE_COUNT = 50 +# Setting this to True will display a "maintenance mode" banner at the top of every page. +MAINTENANCE_MODE = False # Credentials that NetBox will use to access live devices. NETBOX_USERNAME = '' NETBOX_PASSWORD = '' -# Setting this to True will display a "maintenance mode" banner at the top of every page. -MAINTENANCE_MODE = False +# Determine how many objects to display per page within a list. (Default: 50) +PAGINATE_COUNT = 50 + +# Time zone (default: UTC) +TIME_ZONE = 'UTC' diff --git a/netbox/netbox/settings.py b/netbox/netbox/settings.py index 0964296ae..c1a3f210d 100644 --- a/netbox/netbox/settings.py +++ b/netbox/netbox/settings.py @@ -12,7 +12,7 @@ except ImportError: # Import local configuration -for setting in ['DATABASE', 'SECRET_KEY', 'ALLOWED_HOSTS']: +for setting in ['ALLOWED_HOSTS', 'DATABASE', 'SECRET_KEY', 'STATIC_ROOT']: try: globals()[setting] = getattr(configuration, setting) except AttributeError: @@ -20,13 +20,15 @@ for setting in ['DATABASE', 'SECRET_KEY', 'ALLOWED_HOSTS']: "documentation.".format(setting)) # Default configurations -TIME_ZONE = getattr(configuration, 'TIME_ZONE', 'UTC') -MAINTENANCE_MODE = getattr(configuration, 'MAINTENANCE_MODE', False) +ADMINS = getattr(configuration, 'ADMINS', False) +CSRF_TRUSTED_ORIGINS = getattr(configuration, 'CSRF_TRUSTED_ORIGINS', False) DEBUG = getattr(configuration, 'DEBUG', False) LOGIN_REQUIRED = getattr(configuration, 'LOGIN_REQUIRED', False) +MAINTENANCE_MODE = getattr(configuration, 'MAINTENANCE_MODE', False) PAGINATE_COUNT = getattr(configuration, 'PAGINATE_COUNT', 50) NETBOX_USERNAME = getattr(configuration, 'NETBOX_USERNAME', '') NETBOX_PASSWORD = getattr(configuration, 'NETBOX_PASSWORD', '') +TIME_ZONE = getattr(configuration, 'TIME_ZONE', 'UTC') BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))