From c384cec453d283048a28fd113fca64490cf8f3aa Mon Sep 17 00:00:00 2001 From: bctiemann Date: Tue, 10 Mar 2026 11:10:40 -0400 Subject: [PATCH] Closes #21331: Emit deprecation warning on use of querystring template tag (#21476) --- netbox/utilities/templatetags/helpers.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/netbox/utilities/templatetags/helpers.py b/netbox/utilities/templatetags/helpers.py index 0a77b9cab..b5f860456 100644 --- a/netbox/utilities/templatetags/helpers.py +++ b/netbox/utilities/templatetags/helpers.py @@ -1,4 +1,5 @@ import json +import warnings from typing import Any from urllib.parse import quote @@ -363,6 +364,11 @@ def querystring(request, **kwargs): """ Append or update the page number in a querystring. """ + warnings.warn( + 'The querystring template tag is deprecated and will be removed in a future release. Use ' + 'the built-in Django querystring tag instead.', + category=FutureWarning, + ) querydict = request.GET.copy() for k, v in kwargs.items(): if v is not None: