mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Add additional settings
This commit is contained in:
@ -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'
|
||||
|
@ -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__)))
|
||||
|
Reference in New Issue
Block a user