netdevopsbr / netbox-proxbox

Netbox Plugin for integration between Proxmox and Netbox
Apache License 2.0
338 stars 50 forks source link

The problem with the template footer.html #73

Closed deniskonovalov64 closed 1 year ago

deniskonovalov64 commented 1 year ago

Good afternoon, I ran into the same mistake as people before me. I took the full config located in the README, but it still doesn't help.

Python version: 3.8.10 NetBox version: 3.4.2

an example of how I made the config

TEMPLATES_DIR = BASE_DIR + '/templates'

# PROXBOX CUSTOM TEMPLATE
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],  # <--- IMPORTANT
        # The Parameters below is equal to default Netbox config
        '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',
            ],
        },
    },
]
dmembibre commented 1 year ago

Hi,

I have the same error.

Chankster commented 1 year ago

I didn't particularly feel the footer added anything useful so i removed footer.html from the templates and removed the footer block from home.html and proxmox_vm_full_update.html

https://github.com/netdevopsbr/netbox-proxbox/blob/develop/netbox_proxbox/templates/netbox_proxbox/home.html#L12 https://github.com/netdevopsbr/netbox-proxbox/blob/develop/netbox_proxbox/templates/netbox_proxbox/proxmox_vm_full_update.html#L91