Skip to content

netbox-custom-objects 0.6.0 compatibility (2.5.0) - #17

Merged
Kani999 merged 4 commits into
masterfrom
nco-0.6.0-compat-2.5.0
Aug 24, 2026
Merged

netbox-custom-objects 0.6.0 compatibility (2.5.0)#17
Kani999 merged 4 commits into
masterfrom
nco-0.6.0-compat-2.5.0

Conversation

@Kani999

@Kani999 Kani999 commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

Release 2.5.0: requires netbox-custom-objects >=0.6.0 (0.5.x installs stay on 2.4.1). NetBox floors unchanged (4.5.2–4.6.99).

  • Regenerated the customobject.html override from 0.6.0 stock — restores Contacts tab, Config Context tab, owner header, coordinates rendering, polymorphic M2M Type column. Only two deltas from stock; upstream formatting kept so future refreshes are a plain diff.
  • ready() probe now keys off CustomObjectFieldTypeChoices.TYPE_COORDINATES and points at pip install -U 'netbox-custom-objects>=0.6.0'.
  • Fixed: polymorphic filter fields never rendered in the typed-tab sidebar — replaced the local filter-form replica with upstream build_filterset_form_class (also gains the owner filter).
  • Fixed: HTTP 500 TemplateDoesNotExist on tab pages of models without a per-model detail template (ipam/vrf.html, dcim/macaddress.html) — _get_base_template() now delegates to NetBox's get_default_template() (falls back to generic/object.html).
  • Fixed: Field column sort link rendered as literal text (mismatched template brace).
  • Added: Owner column, dropdown filter, and sort in the combined tab (select_related("owner"), no extra queries).

Verified: 58 unit tests pass; ruff/djlint clean; CO detail, combined tab (incl. VRF fallback), and typed tab render 200 against NetBox 4.6 with upstream 0.6.0-based code.

Jan Krupa added 4 commits August 24, 2026 09:08
…ox-custom-objects 0.6.0

The template override was based on 0.5.x and silently dropped upstream
0.6.0 features on the CO detail page: Contacts tab, Config Context tab,
owner display, coordinates rendering with Map button, and the polymorphic
M2M Type column. Regenerated from 0.6.0 stock with only our two deltas
(custom_object_tab_tags load + {% plugin_extra_tabs %} between Contacts
and Journal); the file keeps upstream formatting so future refreshes are
a plain diff against new stock.

The 0.6.0-based template reverses URLs that don't exist on 0.5.x, so the
ready() probe now checks CustomObjectFieldTypeChoices.TYPE_COORDINATES
(added in 0.6.0) and points users at netbox-custom-objects>=0.6.0.
…t.html base template

Two fixes in the typed/combined view plumbing:

- Replace the local filter-form replica in typed.py with upstream's
  build_filterset_form_class (netbox_custom_objects.dynamic_forms) — the
  same builder CustomObjectListView uses. The replica assigned the dict
  returned by polymorphic get_filterform_field() (one form field per
  allowed target type) to a single attribute, so polymorphic filters
  never rendered in the typed-tab sidebar. Also gains the 0.6.0 owner
  filter for free.

- _get_base_template() built "{app}/{model}.html" unconditionally, but
  not every model has one (ipam/vrf.html and dcim/macaddress.html don't
  exist), so {% extends base_template %} raised TemplateDoesNotExist
  (HTTP 500) on those models' tab pages. Delegate to NetBox's
  utilities.views.get_default_template(), which falls back to
  generic/object.html — the same resolution Journal/Changelog tabs use.
  Affected both combined and typed tabs.
Surfaces the 0.6.0 ownership field: sortable Owner column (hideable via
Configure Table, default on), an owner dropdown next to the tag filter,
and owner in the sort keys. Rows fetch owner via select_related — no
extra queries (OwnerMixin is on the CustomObject base, so every dynamic
model has the FK).

Also fixes the Field column sort link, which rendered as literal text
due to a mismatched template brace ({{ sort_headers.field.url %}).
CHANGELOG entry, README compatibility matrix (2.5.x requires
netbox-custom-objects >=0.6.0; 0.5.x installs stay on 2.4.1), and
version bump.
@Kani999
Kani999 merged commit b48db8e into master Aug 24, 2026
2 checks passed
@Kani999
Kani999 deleted the nco-0.6.0-compat-2.5.0 branch August 24, 2026 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant