Closed quiknick closed 2 years ago
You must follow the following section of Installation Guide available here:
Probably on the next release of Netbox, it will not be necessary to make the configuration below! As the Pull Request #8733 got merged to develop branch
Edit /opt/netbox/netbox/netbox and find TEMPLATE_DIR section
TEMPLATES_DIR = BASE_DIR + '/templates'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [TEMPLATES_DIR],
'APP_DIRS': True,
'OPTIONS': {
'builtins': [
'utilities.templatetags.builtins.filters',
'utilities.templatetags.builtins.tags',
],
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.template.context_processors.media',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
'netbox.context_processors.settings_and_registry',
],
},
},
]
TEMPLATES_DIR = BASE_DIR + '/templates'
PROXBOX_TEMPLATE_DIR = BASE_DIR + '/netbox-proxbox/netbox_proxbox/templates/netbox_proxbox'
TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [TEMPLATES_DIR, PROXBOX_TEMPLATE_DIR], 'APP_DIRS': True, 'OPTIONS': { 'builtins': [ 'utilities.templatetags.builtins.filters', 'utilities.templatetags.builtins.tags', ], 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.template.context_processors.media', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', 'netbox.context_processors.settings_and_registry', ], }, }, ]
I did it because I had to change the **base/layout.html** from Netbox, since there is no **Jinja2 block** to fill with custom information into the **footer HTML tag**
Muito obrigado! I was missing the 'DIRS': [TEMPLATES_DIR, PROXBOX_TEMPLATE_DIR],
<class 'django.template.exceptions.TemplateDoesNotExist'>
footer.html
Python version: 3.8.10 NetBox version: 3.2.0 Netbox-proxbox 0.0.4
If I comment out footer.html on the following files in netbox_proxbox/templates/netbox_proxbox/ everything works fine. proxmox_vm_full_update.html proxmox_vm_list.html home.html