Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removed reading of legacy admin popup GET parameter.

refs #20288.
  • Loading branch information...
commit 274048351ae2fc35995645a6dad7c98f74f51eb1 1 parent cb47969
@timgraham timgraham authored
View
3  django/contrib/admin/options.py
@@ -784,8 +784,7 @@ def get_actions(self, request):
"""
# If self.actions is explicitly set to None that means that we don't
# want *any* actions enabled on this page.
- from django.contrib.admin.views.main import _is_changelist_popup
- if self.actions is None or _is_changelist_popup(request):
+ if self.actions is None or IS_POPUP_VAR in request.GET:
return OrderedDict()
actions = []
View
27 django/contrib/admin/views/main.py
@@ -1,6 +1,5 @@
from collections import OrderedDict
import sys
-import warnings
from django.core.exceptions import SuspiciousOperation, ImproperlyConfigured
from django.core.paginator import InvalidPage
@@ -8,7 +7,6 @@
from django.db import models
from django.db.models.fields import FieldDoesNotExist
from django.utils import six
-from django.utils.deprecation import RemovedInDjango18Warning
from django.utils.encoding import force_text
from django.utils.translation import ugettext, ugettext_lazy
from django.utils.http import urlencode
@@ -34,29 +32,6 @@
EMPTY_CHANGELIST_VALUE = ugettext_lazy('(None)')
-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),
- RemovedInDjango18Warning, 2)
- return True
-
- return False
-
-
class ChangeList(object):
def __init__(self, request, model, list_display, list_display_links,
list_filter, date_hierarchy, search_fields, list_select_related,
@@ -82,7 +57,7 @@ def __init__(self, request, model, list_display, list_display_links,
except ValueError:
self.page_num = 0
self.show_all = ALL_VAR in request.GET
- self.is_popup = _is_changelist_popup(request)
+ self.is_popup = IS_POPUP_VAR in request.GET
self.to_field = request.GET.get(TO_FIELD_VAR)
self.params = dict(request.GET.items())
if PAGE_VAR in self.params:
Please sign in to comment.
Something went wrong with that request. Please try again.