瀏覽代碼

Disable update check by default

Sander Steffann 6 年之前
父節點
當前提交
28473fa3e0
共有 3 個文件被更改,包括 7 次插入5 次删除
  1. 3 1
      docs/configuration/optional-settings.md
  2. 3 2
      netbox/netbox/configuration.example.py
  3. 1 2
      netbox/netbox/settings.py

+ 3 - 1
docs/configuration/optional-settings.md

@@ -159,10 +159,12 @@ Enforcement of unique IP space can be toggled on a per-VRF basis. To enforce uni
 
 
 ## UPDATE_REPO_URL
 ## UPDATE_REPO_URL
 
 
-Default: 'https://api.github.com/repos/netbox-community/netbox'
+Default: None
 
 
 The releases of this repository are checked to detect new releases, which are shown on the home page of the web interface. You can change this to your own fork of the NetBox repository, or set it to `None` to disable the check. The URL provided **must** be compatible with the GitHub API.
 The releases of this repository are checked to detect new releases, which are shown on the home page of the web interface. You can change this to your own fork of the NetBox repository, or set it to `None` to disable the check. The URL provided **must** be compatible with the GitHub API.
 
 
+Use `'https://api.github.com/repos/netbox-community/netbox'` to check for release in the official NetBox repository.
+
 ---
 ---
 
 
 ## UPDATE_CACHE_TIMEOUT
 ## UPDATE_CACHE_TIMEOUT

+ 3 - 2
netbox/netbox/configuration.example.py

@@ -125,8 +125,9 @@ EXEMPT_VIEW_PERMISSIONS = [
 ]
 ]
 
 
 # This repository is used to check whether there is a new release of NetBox available. Set to None to disable the
 # This repository is used to check whether there is a new release of NetBox available. Set to None to disable the
-# version check.
-UPDATE_REPO_URL = 'https://api.github.com/repos/netbox-community/netbox'
+# version check or use the URL below to check for release in the official NetBox repository.
+UPDATE_REPO_URL = None
+# UPDATE_REPO_URL = 'https://api.github.com/repos/netbox-community/netbox'
 
 
 # This determines how often the GitHub API is called to check the latest release of NetBox. Must be at least 1 hour.
 # This determines how often the GitHub API is called to check the latest release of NetBox. Must be at least 1 hour.
 UPDATE_CACHE_TIMEOUT = 24 * 3600
 UPDATE_CACHE_TIMEOUT = 24 * 3600

+ 1 - 2
netbox/netbox/settings.py

@@ -80,8 +80,7 @@ DEVELOPER = getattr(configuration, 'DEVELOPER', False)
 EMAIL = getattr(configuration, 'EMAIL', {})
 EMAIL = getattr(configuration, 'EMAIL', {})
 ENFORCE_GLOBAL_UNIQUE = getattr(configuration, 'ENFORCE_GLOBAL_UNIQUE', False)
 ENFORCE_GLOBAL_UNIQUE = getattr(configuration, 'ENFORCE_GLOBAL_UNIQUE', False)
 EXEMPT_VIEW_PERMISSIONS = getattr(configuration, 'EXEMPT_VIEW_PERMISSIONS', [])
 EXEMPT_VIEW_PERMISSIONS = getattr(configuration, 'EXEMPT_VIEW_PERMISSIONS', [])
-UPDATE_REPO_URL = getattr(configuration, 'UPDATE_REPO_URL',
-                          'https://api.github.com/repos/netbox-community/netbox')
+UPDATE_REPO_URL = getattr(configuration, 'UPDATE_REPO_URL', None)
 UPDATE_CACHE_TIMEOUT = getattr(configuration, 'UPDATE_CACHE_TIMEOUT', 24 * 3600)
 UPDATE_CACHE_TIMEOUT = getattr(configuration, 'UPDATE_CACHE_TIMEOUT', 24 * 3600)
 LOGGING = getattr(configuration, 'LOGGING', {})
 LOGGING = getattr(configuration, 'LOGGING', {})
 LOGIN_REQUIRED = getattr(configuration, 'LOGIN_REQUIRED', False)
 LOGIN_REQUIRED = getattr(configuration, 'LOGIN_REQUIRED', False)