mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Moved PAGINATE_COUNT to configuration.py
This commit is contained in:
@@ -1,20 +1,19 @@
|
||||
#########################
|
||||
# #
|
||||
# Required settings #
|
||||
# #
|
||||
#########################
|
||||
|
||||
# This key is used for secure generation of random numbers and strings. It must never be exposed outside of this file.
|
||||
# For optimal security, SECRET_KEY should be at least 50 characters in length and contain a mix of letters, numbers, and
|
||||
# symbols. NetBox will not run without this defined. For more information, see
|
||||
# https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-SECRET_KEY
|
||||
SECRET_KEY = ''
|
||||
|
||||
# If enabled, NetBox will run with debugging turned on. This should only be used for development or troubleshooting.
|
||||
# NEVER ENABLE DEBUGGING ON A PRODUCTION SYSTEM.
|
||||
DEBUG = False
|
||||
|
||||
# Set this to your server's FQDN. This is required when DEBUG = False.
|
||||
# E.g. ALLOWED_HOSTS = ['netbox.yourdomain.com']
|
||||
ALLOWED_HOSTS = []
|
||||
|
||||
# Setting this to true will display a "maintenance mode" banner at the top of every page.
|
||||
MAINTENANCE_MODE = False
|
||||
|
||||
# PostgreSQL database configuration.
|
||||
DATABASES = {
|
||||
'default': {
|
||||
@@ -27,10 +26,28 @@ DATABASES = {
|
||||
}
|
||||
}
|
||||
|
||||
# If true, user authentication will be required for all site access. If false, unauthenticated users will be able to
|
||||
|
||||
#########################
|
||||
# #
|
||||
# Optional settings #
|
||||
# #
|
||||
#########################
|
||||
|
||||
# Setting this to True will display a "maintenance mode" banner at the top of every page.
|
||||
MAINTENANCE_MODE = False
|
||||
|
||||
# If enabled, NetBox will run with debugging turned on. This should only be used for development or troubleshooting.
|
||||
#
|
||||
# NEVER ENABLE DEBUGGING ON A PRODUCTION SYSTEM!
|
||||
DEBUG = False
|
||||
|
||||
# If True, user authentication will be required for all site access. If False, unauthenticated users will be able to
|
||||
# access NetBox but not make any changes.
|
||||
LOGIN_REQUIRED = False
|
||||
|
||||
# Credentials that NetBox will use to access live devices. (Optional)
|
||||
# Determine how many objects to display per page within a list. (Default: 50)
|
||||
PAGINATE_COUNT = 50
|
||||
|
||||
# Credentials that NetBox will use to access live devices.
|
||||
NETBOX_USERNAME = ''
|
||||
NETBOX_PASSWORD = ''
|
||||
|
@@ -1,9 +1,12 @@
|
||||
import os
|
||||
import socket
|
||||
|
||||
from django.contrib.messages import constants as messages
|
||||
|
||||
|
||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
# Application definition
|
||||
# Installed applications
|
||||
INSTALLED_APPS = (
|
||||
'django.contrib.admin',
|
||||
'django.contrib.auth',
|
||||
@@ -25,6 +28,7 @@ INSTALLED_APPS = (
|
||||
'utilities',
|
||||
)
|
||||
|
||||
# Middleware
|
||||
MIDDLEWARE_CLASSES = (
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
@@ -57,6 +61,7 @@ TEMPLATES = [
|
||||
},
|
||||
]
|
||||
|
||||
# WSGI
|
||||
WSGI_APPLICATION = 'netbox.wsgi.application'
|
||||
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
|
||||
|
||||
@@ -67,7 +72,6 @@ TIME_ZONE = 'UTC'
|
||||
USE_I18N = True
|
||||
USE_TZ = True
|
||||
|
||||
|
||||
# Static files (CSS, JavaScript, Images)
|
||||
# https://docs.djangoproject.com/en/1.8/howto/static-files/
|
||||
STATIC_URL = '/static/'
|
||||
@@ -76,15 +80,11 @@ STATICFILES_DIRS = (
|
||||
)
|
||||
|
||||
# Messages
|
||||
from django.contrib.messages import constants as messages
|
||||
MESSAGE_TAGS = {
|
||||
messages.ERROR: 'danger',
|
||||
}
|
||||
|
||||
# Pagination
|
||||
PAGINATE_COUNT = 50
|
||||
|
||||
# Authentication
|
||||
# Authentication URLs
|
||||
LOGIN_URL = '/login/'
|
||||
LOGIN_REDIRECT_URL = '/'
|
||||
LOGOUT_URL = '/logout/'
|
||||
|
Reference in New Issue
Block a user