Skip to main content

netbox-custom-objects-tab

CI PyPI Python NetBox License

A NetBox 4.5.x / 4.6.x / 4.7.x plugin that adds one tab per Custom Object Type to object detail pages. Each tab is a full-featured list of the Custom Object instances (from the netbox-custom-objects plugin) that reference the viewed object via an OBJECT or MULTIOBJECT field — with type-specific columns, filter sidebar, bulk actions, pre-filled Add buttons and per-user table configuration, matching the native /plugins/custom-objects/<type>/ list page.

Works on standard NetBox models (Device, Site, Rack, …), third-party plugin models, and Custom Object detail pages themselves (CO→CO relationships).

Looking for the combined "Custom Objects" tab? Since netbox-custom-objects 0.7.0 it is built into the upstream plugin (one tab listing every referencing Custom Object, any type, with search / type / tag filters). It needs no configuration and appears on every referenced object. This plugin only adds the per-type tabs; versions ≤ 2.6 shipped a combined tab of their own, which was removed in 3.0.0.

Requirements

  • NetBox 4.5.2 – 4.7.99
  • netbox-custom-objects ≥ 0.7.0 installed and loaded (netboxlabs-netbox-custom-objects on PyPI)

Compatibility

Plugin version NetBox version netbox_custom_objects version
3.0.x 4.5.2+ / 4.6.x / 4.7.x ≥ 0.7.0 required
2.6.x 4.5.2+ / 4.6.x / 4.7.x ≥ 0.6.0 (≥ 0.6.1 on NetBox 4.7), < 0.7.0
2.5.x 4.5.2+ / 4.6.x ≥ 0.6.0
2.4.x 4.5.2+ / 4.6.x ≥ 0.5.1
2.0.x – 2.3.x 4.5.x / 4.6.x ≥ 0.4.6
1.0.x 4.5.x ≥ 0.4.4

The 0.7.0 minimum is enforced at startup: PluginConfig.ready() probes for the upstream related_tabs package (new in 0.7.0) and raises ImproperlyConfigured with an upgrade hint if it is missing. The check is behaviour-based (looks for the feature, not a version string) so it stays correct across forks and pre-release tags. 0.7.0 is required because its Custom Object detail template renders registered model-view tabs, which is how the per-type tabs reach Custom Object pages; older releases needed a template override that 3.0.0 no longer ships.

Installation

source /opt/netbox/venv/bin/activate
pip install netbox-custom-objects-tab

Add to NetBox configuration.py:

PLUGINS = [
    'netbox_custom_objects',
    'netbox_custom_objects_tab',
]

PLUGINS_CONFIG = {
    'netbox_custom_objects_tab': {
        'typed_models': ['dcim.*'],   # required — the plugin does nothing until set
        'typed_weight': 2100,         # optional, default shown
    }
}

Restart NetBox. No database migrations required.

Upgrading from 2.x

  1. pip install -U 'netboxlabs-netbox-custom-objects>=0.7.0' netbox-custom-objects-tab
  2. Remove combined_models, combined_label and combined_weight from PLUGINS_CONFIG (a leftover key only logs a warning at startup; it has no effect).
  3. Restart NetBox. The combined tab keeps working — it is now served by netbox-custom-objects.

Configuration

Setting Default Description
typed_models [] Models that get one tab per Custom Object Type referencing them. Accepts app_label.model_name or app_label.* wildcards. Empty = plugin inactive.
typed_weight 2100 Tab position for all typed tabs; lower = further left. Upstream's combined tab sits at 2000, so typed tabs follow it by default.

Examples

# Per-type tabs on every dcim model
'typed_models': ['dcim.*']

# Only specific models
'typed_models': ['dcim.device', 'dcim.site', 'ipam.prefix']

# Third-party plugin models work identically
'typed_models': ['dcim.*', 'ipam.*', 'inventory_monitor.*']

# Tabs on Custom Object detail pages too (CO → CO relationships)
'typed_models': ['dcim.*', 'netbox_custom_objects.*']

Third-party plugin models are fully supported — Django treats plugin apps and built-in apps the same way in the app registry. Add the plugin's app label and restart NetBox once.

Tabs on Custom Object detail pages

Setting netbox_custom_objects.* in typed_models enables tabs on Custom Object detail pages themselves. When Custom Object Type A has a field referencing Type B, every Type B instance gets a "Type A" tab listing the Type A objects that link to it.

Because Custom Object model classes are generated dynamically (one per type), a NetBox restart is required whenever a new Custom Object Type is added — this applies to all typed tabs, on native models and on Custom Object pages alike.

Tabs are hidden automatically (hide_if_empty=True) when nothing references the viewed object.

Features

Each typed tab reuses the building blocks of the native Custom Objects list view from netbox-custom-objects, so it looks and behaves like /plugins/custom-objects/<type>/ pre-filtered to the current object:

  • Type-specific columns — every visible field of the Custom Object Type, rendered by the upstream field-type renderers (links, badges, coordinates, …), plus ID, tags and actions.
  • Filter sidebar — the upstream dynamic filterset and filter form for that type, including polymorphic fields and the owner filter.
  • Quick search, sorting, pagination — NetBox's standard table controls, updated in place via HTMX (htmx/table.html), so paging and sorting never reload the page.
  • Configure Table — per-user column selection and ordering, stored in UserConfig.
  • Add buttons — one per referencing field, opening the upstream create form with the reference to the current object pre-filled; returns to the tab afterwards.
  • Bulk edit / bulk delete — row checkboxes and the upstream bulk views, with the return URL pointing back to the tab. Available because all rows in a typed tab share one type.
  • Per-row Edit / Delete — via upstream's CustomObjectActionsColumn, permission-aware.
  • Cheap badge counts — the tab badge is a single COUNT(*) with .distinct(); a row that references the object through several fields is counted once. Full rows load only when the tab is opened.
  • Permission-aware — rows are restricted with .restrict(user, "view"); Add / bulk buttons honour netbox_custom_objects.{add,change,delete}_customobject.

How It Works

At startup (PluginConfig.ready()), the plugin reads every CustomObjectTypeField of type Object / Multi-Object (polymorphic ones included), groups them by (referenced model, Custom Object Type), and registers one ViewTab view per pair on each model listed in typed_models using NetBox's register_model_view. Each view builds a base queryset (Q per referencing field, OR-ed, .distinct()), applies the upstream filterset, and renders a dynamically built CustomObjectTable subclass.

On Custom Object detail pages, which upstream serves through a single generic URL, the plugin appends one <type-slug>/<pk>/custom-objects-<slug>/ route per referencing type to the upstream URLconf. The route resolves the host type from the slug per request and dispatches to the view registered for exactly that model, so the correct object loads and the tab highlights as active.

Support

Contributing

Pull requests are welcome. For significant changes, please open an issue first.

License

Apache-2.0

Metadata

Release files for netbox-custom-objects-tab 3.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for netbox-custom-objects-tab 3.0.0
File Size Uploaded
netbox_custom_objects_tab-3.0.0.tar.gz 29.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for netbox-custom-objects-tab 3.0.0
File Interpreter ABI Platform
netbox_custom_objects_tab-3.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 51.7 kB

Release files / netbox_custom_objects_tab-3.0.0.tar.gz

Download URL netbox_custom_objects_tab-3.0.0.tar.gz
Size 29.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c0a5475dfbebf32e9b52959b427e3e6e325814c975969a9036ab10a481d833bb
BLAKE2b-256 checksum
How to use checksums
5a123bdf8a3cf7b2b0a3ee644934fb039c56e70e1eac3320d9a7300ae0bc7a9d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.

Transparency log

Release files / netbox_custom_objects_tab-3.0.0-py3-none-any.whl

Download URL netbox_custom_objects_tab-3.0.0-py3-none-any.whl
Size 22.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
af6fb82f17c3f63091646bf872d458fdd0845491aa63deae55d724e47034fca0
BLAKE2b-256 checksum
How to use checksums
790908679b0a60ae0c1ad7444c2caeb88fa1692ed9b50489439073d65f288f5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

3.0.0 This release

2 release files

2.6.1

2 release files

2.6.0

2 release files

2.5.0

2 release files

2.4.1

2 release files

2.4.0

2 release files

2.3.0

2 release files

2.2.0

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.2

2 release files

2.0.1

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page