1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

132 lines
3.5 KiB
Markdown
Raw Normal View History

The following are optional settings which may be declared in `netbox/netbox/configuration.py`.
2016-05-24 12:38:06 -04:00
## ADMINS
2016-05-24 11:46:55 -04:00
2016-05-24 14:24:35 -04:00
NetBox will email details about critical errors to the administrators listed here. This should be a list of (name, email) tuples. For example:
2016-05-24 11:46:55 -04:00
```
2016-05-24 14:24:35 -04:00
ADMINS = [
['Hank Hill', 'hhill@example.com'],
['Dale Gribble', 'dgribble@example.com'],
]
2016-05-24 11:46:55 -04:00
```
2016-05-24 14:24:35 -04:00
---
## BANNER_TOP
## BANNER_BOTTOM
Setting these variables will display content in a banner at the top and/or bottom of the page, respectively. To replicate the content of the top banner in the bottom banner, set:
```
BANNER_TOP = 'Your banner text'
BANNER_BOTTOM = BANNER_TOP
```
---
## BASE_PATH
Default: None
The base URL path to use when accessing NetBox. Do not include the scheme or domain name. For example, if installed at http://example.com/netbox/, set:
```
BASE_PATH = 'netbox/'
```
---
## DEBUG
2016-05-24 14:24:35 -04:00
Default: False
This setting enables debugging. This should be done only during development or troubleshooting. Never enable debugging on a production system, as it can expose sensitive data to unauthenticated users.
2016-05-24 12:38:06 -04:00
---
2016-05-24 11:46:55 -04:00
## EMAIL
2016-05-24 11:46:55 -04:00
2016-05-24 14:24:35 -04:00
In order to send email, NetBox needs an email server configured. The following items can be defined within the `EMAIL` setting:
2016-05-24 11:46:55 -04:00
2016-05-24 14:24:35 -04:00
* SERVER - Host name or IP address of the email server (use `localhost` if running locally)
* PORT - TCP port to use for the connection (default: 25)
* USERNAME - Username with which to authenticate
* PASSSWORD - Password with which to authenticate
* TIMEOUT - Amount of time to wait for a connection (seconds)
* FROM_EMAIL - Sender address for emails sent by NetBox
2016-05-24 11:46:55 -04:00
2016-05-24 12:38:06 -04:00
---
# ENFORCE_GLOBAL_UNIQUE
Default: False
Enforcement of unique IP space can be toggled on a per-VRF basis. To enforce unique IP space within the global table (all prefixes and IP addresses not assigned to a VRF), set `ENFORCE_GLOBAL_UNIQUE` to True.
---
## LOGIN_REQUIRED
2016-05-24 11:46:55 -04:00
Default: False
2016-05-24 11:46:55 -04:00
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.
2016-05-24 12:38:06 -04:00
---
## MAINTENANCE_MODE
2016-05-24 11:46:55 -04:00
2016-05-24 14:24:35 -04:00
Default: False
2016-05-24 11:46:55 -04:00
2016-05-24 14:24:35 -04:00
Setting this to True will display a "maintenance mode" banner at the top of every page.
2016-05-24 11:46:55 -04:00
2016-05-24 12:38:06 -04:00
---
## NETBOX_USERNAME
2016-05-24 11:46:55 -04:00
## NETBOX_PASSWORD
2016-05-24 11:46:55 -04:00
If provided, NetBox will use these credentials to authenticate against devices when collecting data.
2016-05-24 12:38:06 -04:00
---
## PAGINATE_COUNT
2016-05-24 11:46:55 -04:00
2016-05-24 14:24:35 -04:00
Default: 50
2016-05-24 11:46:55 -04:00
2016-05-24 14:24:35 -04:00
Determine how many objects to display per page within each list of objects.
2016-05-24 11:46:55 -04:00
2016-05-24 12:38:06 -04:00
---
## PREFER_IPV4
Default: False
When determining the primary IP address for a device, IPv6 is preferred over IPv4 by default. Set this to True to prefer IPv4 instead.
---
## TIME_ZONE
2016-05-24 11:46:55 -04:00
2016-05-24 14:24:35 -04:00
Default: UTC
2016-05-24 11:46:55 -04:00
2016-05-24 14:24:35 -04:00
The time zone NetBox will use when dealing with dates and times. It is recommended to use UTC time unless you have a specific need to use a local time zone. [List of available time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
---
## Date and Time Formatting
You may define custom formatting for date and times. For detailed instructions on writing format strings, please see [the Django documentation](https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date).
Defaults:
```
DATE_FORMAT = 'N j, Y' # June 26, 2016
SHORT_DATE_FORMAT = 'Y-m-d' # 2016-06-27
TIME_FORMAT = 'g:i a' # 1:23 p.m.
SHORT_TIME_FORMAT = 'H:i:s' # 13:23:00
DATETIME_FORMAT = 'N j, Y g:i a' # June 26, 2016 1:23 p.m.
SHORT_DATETIME_FORMAT = 'Y-m-d H:i' # 2016-06-27 13:23
```