[PR #14873] [MERGED] Closes #14735: Implement django-htmx #14472

Closed
opened 2025-12-29 23:24:40 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/14873
Author: @jeremystretch
Created: 1/19/2024
Status: Merged
Merged: 1/22/2024
Merged by: @jeremystretch

Base: featureHead: 14735-django-htmx


📝 Commits (4)

  • 1d3b107 Install django-htmx
  • e799821 Replace is_htmx() function with request.htmx
  • dd8d2e1 Remove is_embedded() HTMX utility
  • 21e2a60 Include django-htmx debug error handler

📊 Changes

9 files changed (+22 additions, -43 deletions)

View changed files

📝 base_requirements.txt (+4 -0)
📝 netbox/extras/views.py (+5 -8)
📝 netbox/netbox/settings.py (+2 -0)
📝 netbox/netbox/views/generic/bulk_views.py (+2 -3)
📝 netbox/netbox/views/generic/object_views.py (+5 -6)
📝 netbox/netbox/views/misc.py (+1 -2)
📝 netbox/templates/base/base.html (+2 -0)
netbox/utilities/htmx.py (+0 -24)
📝 requirements.txt (+1 -0)

📄 Description

Fixes: #14735

  • Introduce django-htmx as a new dependency
  • Add HtmxMiddleware to middleware
  • Replace is_htmx() by evaluating request.htmx
  • Replace is_embedded() by evaluating the target element ID

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/14873 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 1/19/2024 **Status:** ✅ Merged **Merged:** 1/22/2024 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `feature` ← **Head:** `14735-django-htmx` --- ### 📝 Commits (4) - [`1d3b107`](https://github.com/netbox-community/netbox/commit/1d3b10709262ed558db1430a7ca26f5a338731bc) Install django-htmx - [`e799821`](https://github.com/netbox-community/netbox/commit/e799821032b10f2789240fb7b01b852039a25fb5) Replace is_htmx() function with request.htmx - [`dd8d2e1`](https://github.com/netbox-community/netbox/commit/dd8d2e17189af529fda15ea0389f87ebde5142c4) Remove is_embedded() HTMX utility - [`21e2a60`](https://github.com/netbox-community/netbox/commit/21e2a60c1be922c967a8eda2f152f62be8e68624) Include django-htmx debug error handler ### 📊 Changes **9 files changed** (+22 additions, -43 deletions) <details> <summary>View changed files</summary> 📝 `base_requirements.txt` (+4 -0) 📝 `netbox/extras/views.py` (+5 -8) 📝 `netbox/netbox/settings.py` (+2 -0) 📝 `netbox/netbox/views/generic/bulk_views.py` (+2 -3) 📝 `netbox/netbox/views/generic/object_views.py` (+5 -6) 📝 `netbox/netbox/views/misc.py` (+1 -2) 📝 `netbox/templates/base/base.html` (+2 -0) ➖ `netbox/utilities/htmx.py` (+0 -24) 📝 `requirements.txt` (+1 -0) </details> ### 📄 Description ### Fixes: #14735 - Introduce `django-htmx` as a new dependency - Add `HtmxMiddleware` to middleware - Replace `is_htmx()` by evaluating `request.htmx` - Replace `is_embedded()` by evaluating the target element ID --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 23:24:40 +01:00
adam closed this issue 2025-12-29 23:24:41 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14472