Use NetBox's generic object template for detail views

Open
#231 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
57/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
backend

Research direction

Start with the Script Project, Script File, Script, and migration run detail views and their templates. Compare how the views declare NetBox's generic object layout with the existing model-specific templates; keep the migration run template for its custom content and declare its breadcrumbs through the layout. Done when the redundant templates are removed, the intended views use the generic template, and rendered pages remain unchanged.

Written by the indexing model from the issue text.

Description

app: scripts status: backlog type: housekeeping
Proposed Changes

Use generic/object.html directly for the Script Project, Script File and Script detail views, removing their redundant model-specific templates.

Declare the migration run's breadcrumbs through its layout while retaining the template for its custom content.

Justification

These detail views already use NetBox's declarative UI components, and their model-specific templates provide no additional functionality.

Using the generic object template directly reduces unnecessary template files, keeps the page definitions in their respective views and aligns the plugin with NetBox's existing conventions.

No changes to the rendered pages are intended.

Dominant language
Python
Stars
9
Forks
0
Avg merge
18h 59m
Merged PRs (30d)
93

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from netbox-community/netbox-scripts

All issues in netbox-community/netbox-scripts

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.