From b277d9265466608e3108de9f6675b52e718c4ef8 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Thu, 7 May 2026 08:41:01 -0400 Subject: [PATCH] Remove the custom querystring template tag (closes #19091) Removes the deprecated querystring template tag from utilities/templatetags/ helpers.py and updates all 30 call sites across templates to use Django's built-in querystring tag (available since Django 5.1). The request argument is dropped since the built-in tag reads from the template context automatically. Co-Authored-By: Claude Sonnet 4.6 --- docs/release-notes/version-4.7.md | 13 ++++++++++ .../templates/dcim/rack_elevation_list.html | 8 +++---- netbox/templates/dcim/rack_list.html | 2 +- netbox/templates/generic/bulk_add.html | 2 +- netbox/templates/inc/paginator.html | 16 ++++++------- .../ipam/inc/ipaddress_edit_header.html | 6 ++--- netbox/templates/ipam/inc/max_depth.html | 4 ++-- netbox/templates/ipam/inc/max_length.html | 4 ++-- .../ipam/inc/prefix_edit_header.html | 4 ++-- .../templates/ipam/inc/toggle_available.html | 6 ++--- netbox/templates/ipam/ipaddress_assign.html | 2 +- netbox/utilities/templatetags/helpers.py | 24 ------------------- 12 files changed, 40 insertions(+), 51 deletions(-) create mode 100644 docs/release-notes/version-4.7.md diff --git a/docs/release-notes/version-4.7.md b/docs/release-notes/version-4.7.md new file mode 100644 index 000000000..f46cd5076 --- /dev/null +++ b/docs/release-notes/version-4.7.md @@ -0,0 +1,13 @@ +# NetBox v4.7 + +## v4.7.0 (FUTURE) + +### Breaking Changes + +### Enhancements + +### Other Changes + +* [#19091](https://github.com/netbox-community/netbox/issues/19091) - Remove the custom `querystring` template tag (use Django's built-in tag instead) + +### REST API Changes diff --git a/netbox/templates/dcim/rack_elevation_list.html b/netbox/templates/dcim/rack_elevation_list.html index 828e862eb..dcab72eeb 100644 --- a/netbox/templates/dcim/rack_elevation_list.html +++ b/netbox/templates/dcim/rack_elevation_list.html @@ -8,7 +8,7 @@ {% block controls %}
- + {% trans "View List" %} diff --git a/netbox/templates/dcim/rack_list.html b/netbox/templates/dcim/rack_list.html index ca72d2f25..1772ea7df 100644 --- a/netbox/templates/dcim/rack_list.html +++ b/netbox/templates/dcim/rack_list.html @@ -4,7 +4,7 @@ {% load i18n %} {% block extra_controls %} - + {% trans "View Elevations" %} {% endblock %} diff --git a/netbox/templates/generic/bulk_add.html b/netbox/templates/generic/bulk_add.html index 99b60b3a1..33bc0d769 100644 --- a/netbox/templates/generic/bulk_add.html +++ b/netbox/templates/generic/bulk_add.html @@ -8,7 +8,7 @@ {% block tabs %}