Extend ObjectEditView to support HTMX requests #10121

Closed
opened 2025-12-29 21:27:09 +01:00 by adam · 0 comments
Owner

Originally created by @jeremystretch on GitHub (Aug 20, 2024).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v4.1-beta1

Feature type

New functionality

Proposed functionality

Extend NetBox's generic ObjectEditView to support modifying objects via HTMX POST requests. This view currently supports HTMX only for GET requests.

This will entail checking whether a POST request is HTMX-enabled, and if so returning the applicable rendered content directly (rather than returning a 302 redirect).

Use case

This change is necessary to support editing objects in place within an HTML template, and will unlock future functionality.

Database changes

None

External dependencies

None

Originally created by @jeremystretch on GitHub (Aug 20, 2024). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v4.1-beta1 ### Feature type New functionality ### Proposed functionality Extend NetBox's generic [ObjectEditView](https://netboxlabs.com/docs/netbox/en/stable/plugins/development/views/#netbox.views.generic.object_views.ObjectEditView) to support modifying objects via HTMX `POST` requests. This view currently supports HTMX only for `GET` requests. This will entail checking whether a `POST` request is HTMX-enabled, and if so returning the applicable rendered content directly (rather than returning a 302 redirect). ### Use case This change is necessary to support editing objects in place within an HTML template, and will unlock future functionality. ### Database changes None ### External dependencies None
adam added the status: acceptedtype: featurecomplexity: medium labels 2025-12-29 21:27:09 +01:00
adam closed this issue 2025-12-29 21:27:09 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10121