def _is_changelist_popup(request):
"""
Returns True if the popup GET parameter is set.
This function is introduced to facilitate deprecating the legacy
value for IS_POPUP_VAR and should be removed at the end of the
deprecation cycle.
"""
if IS_POPUP_VAR in request.GET:
return True
IS_LEGACY_POPUP_VAR = 'pop'
if IS_LEGACY_POPUP_VAR in request.GET:
warnings.warn(
"The `%s` GET parameter has been renamed to `%s`." %
(IS_LEGACY_POPUP_VAR, IS_POPUP_VAR),
PendingDeprecationWarning, 2)
return True
return False
评论列表
文章目录