from extras.plugins import PluginTemplateExtension


class DeviceSchemaExtension(PluginTemplateExtension):
    """Extend DCIM device template with 'Schema' button."""
    model = "dcim.device"

    def buttons(self):
        return self.render("device_schema/schema_button.html")

template_extensions = [DeviceSchemaExtension]

from extras.plugins import PluginTemplateExtension


class DeviceSchemaExtension(PluginTemplateExtension):
    """Extend DCIM device template with 'Schema' button."""
    model = "dcim.device"

    def buttons(self):
        return self.render("device_schema/schema_button.html")

template_extensions = [DeviceSchemaExtension]

Extend DCIM device template with 'Schema' button.