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.
|
# PostgreSQL database configuration.
|
||||||
DATABASE = {
|
DATABASE = {
|
||||||
'NAME': 'netbox', # Database name
|
'NAME': 'netbox', # Database name
|
||||||
'USER': 'netbox', # PostgreSQL username
|
'USER': '', # PostgreSQL username
|
||||||
'PASSWORD': '', # PostgreSQL password
|
'PASSWORD': '', # PostgreSQL password
|
||||||
'HOST': 'localhost', # Database server
|
'HOST': 'localhost', # Database server
|
||||||
'PORT': '', # Database port (leave blank for default)
|
'PORT': '', # Database port (leave blank for default)
|
||||||
@ -19,10 +23,6 @@ DATABASE = {
|
|||||||
# https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-SECRET_KEY
|
# https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-SECRET_KEY
|
||||||
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)
|
# Email settings
|
||||||
TIME_ZONE = 'UTC'
|
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
|
# 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.
|
# are permitted to access most data in NetBox (excluding secrets) but not make any changes.
|
||||||
LOGIN_REQUIRED = False
|
LOGIN_REQUIRED = False
|
||||||
|
|
||||||
# Determine how many objects to display per page within a list. (Default: 50)
|
# Setting this to True will display a "maintenance mode" banner at the top of every page.
|
||||||
PAGINATE_COUNT = 50
|
MAINTENANCE_MODE = False
|
||||||
|
|
||||||
# Credentials that NetBox will use to access live devices.
|
# Credentials that NetBox will use to access live devices.
|
||||||
NETBOX_USERNAME = ''
|
NETBOX_USERNAME = ''
|
||||||
NETBOX_PASSWORD = ''
|
NETBOX_PASSWORD = ''
|
||||||
|
|
||||||
# Setting this to True will display a "maintenance mode" banner at the top of every page.
|
# Determine how many objects to display per page within a list. (Default: 50)
|
||||||
MAINTENANCE_MODE = False
|
PAGINATE_COUNT = 50
|
||||||
|
|
||||||
|
# Time zone (default: UTC)
|
||||||
|
TIME_ZONE = 'UTC'
|
||||||
|
@ -12,7 +12,7 @@ except ImportError:
|
|||||||
|
|
||||||
|
|
||||||
# Import local configuration
|
# Import local configuration
|
||||||
for setting in ['DATABASE', 'SECRET_KEY', 'ALLOWED_HOSTS']:
|
for setting in ['ALLOWED_HOSTS', 'DATABASE', 'SECRET_KEY', 'STATIC_ROOT']:
|
||||||
try:
|
try:
|
||||||
globals()[setting] = getattr(configuration, setting)
|
globals()[setting] = getattr(configuration, setting)
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
@ -20,13 +20,15 @@ for setting in ['DATABASE', 'SECRET_KEY', 'ALLOWED_HOSTS']:
|
|||||||
"documentation.".format(setting))
|
"documentation.".format(setting))
|
||||||
|
|
||||||
# Default configurations
|
# Default configurations
|
||||||
TIME_ZONE = getattr(configuration, 'TIME_ZONE', 'UTC')
|
ADMINS = getattr(configuration, 'ADMINS', False)
|
||||||
MAINTENANCE_MODE = getattr(configuration, 'MAINTENANCE_MODE', False)
|
CSRF_TRUSTED_ORIGINS = getattr(configuration, 'CSRF_TRUSTED_ORIGINS', False)
|
||||||
DEBUG = getattr(configuration, 'DEBUG', False)
|
DEBUG = getattr(configuration, 'DEBUG', False)
|
||||||
LOGIN_REQUIRED = getattr(configuration, 'LOGIN_REQUIRED', False)
|
LOGIN_REQUIRED = getattr(configuration, 'LOGIN_REQUIRED', False)
|
||||||
|
MAINTENANCE_MODE = getattr(configuration, 'MAINTENANCE_MODE', False)
|
||||||
PAGINATE_COUNT = getattr(configuration, 'PAGINATE_COUNT', 50)
|
PAGINATE_COUNT = getattr(configuration, 'PAGINATE_COUNT', 50)
|
||||||
NETBOX_USERNAME = getattr(configuration, 'NETBOX_USERNAME', '')
|
NETBOX_USERNAME = getattr(configuration, 'NETBOX_USERNAME', '')
|
||||||
NETBOX_PASSWORD = getattr(configuration, 'NETBOX_PASSWORD', '')
|
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__)))
|
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||||
|
Reference in New Issue
Block a user