mirror of
https://github.com/netbox-community/netbox.git
synced 2026-03-21 20:18:38 -06:00
Emit deprecation warning on use of querystring template tag
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import json
|
||||
import logging
|
||||
from typing import Dict, Any
|
||||
from urllib.parse import quote
|
||||
|
||||
@@ -13,6 +14,8 @@ from utilities.forms.mixins import FORM_FIELD_LOOKUPS
|
||||
from utilities.views import get_viewname, get_action_url
|
||||
from netbox.settings import DISK_BASE_UNIT, RAM_BASE_UNIT
|
||||
|
||||
logger = logging.getLogger("netbox.utilities.templatetags.helpers")
|
||||
|
||||
__all__ = (
|
||||
'action_url',
|
||||
'applied_filters',
|
||||
@@ -364,6 +367,10 @@ def querystring(request, **kwargs):
|
||||
"""
|
||||
Append or update the page number in a querystring.
|
||||
"""
|
||||
logger.warning(
|
||||
'The querystring template tag is deprecated and will be removed in a future release. Use '
|
||||
'the built-in Django querystring tag instead.',
|
||||
)
|
||||
querydict = request.GET.copy()
|
||||
for k, v in kwargs.items():
|
||||
if v is not None:
|
||||
|
||||
Reference in New Issue
Block a user