Tweak UPDATE_REPO_URL to convey the full URL

This commit is contained in:
Jeremy Stretch
2020-03-13 12:14:27 -04:00
parent e2123f4a9e
commit 2033d15b2f
3 changed files with 27 additions and 27 deletions

View File

@@ -124,14 +124,6 @@ EXEMPT_VIEW_PERMISSIONS = [
# 'ipam.prefix',
]
# This repository is used to check whether there is a new release of NetBox available. Set to None to disable the
# 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.
UPDATE_CACHE_TIMEOUT = 24 * 3600
# Enable custom logging. Please see the Django documentation for detailed guidance on configuring custom logs:
# https://docs.djangoproject.com/en/stable/topics/logging/
LOGGING = {}
@@ -203,6 +195,14 @@ SESSION_FILE_PATH = None
# Time zone (default: UTC)
TIME_ZONE = 'UTC'
# 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
# This repository is used to check whether there is a new release of NetBox available. Set to None to disable the
# 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/releases'
# Date/time formatting. See the following link for supported formats:
# https://docs.djangoproject.com/en/stable/ref/templates/builtins/#date
DATE_FORMAT = 'N j, Y'

View File

@@ -12,7 +12,7 @@ logger = logging.getLogger('netbox.releases')
@job
def get_releases(pre_releases=False):
url = '{}/releases'.format(settings.UPDATE_REPO_URL)
url = settings.UPDATE_REPO_URL
headers = {
'Accept': 'application/vnd.github.v3+json',
}