Closes #21331: Emit deprecation warning on use of querystring template tag (#21476)

This commit is contained in:
bctiemann 2026-03-10 11:10:40 -04:00 committed by GitHub
parent e3d9fe622d
commit c384cec453
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 0 deletions

View File

@ -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: