Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
27404835
Kaydet (Commit)
27404835
authored
Mar 21, 2014
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Removed reading of legacy admin popup GET parameter.
refs #20288.
üst
cb47969c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
28 deletions
+2
-28
options.py
django/contrib/admin/options.py
+1
-2
main.py
django/contrib/admin/views/main.py
+1
-26
No files found.
django/contrib/admin/options.py
Dosyayı görüntüle @
27404835
...
...
@@ -784,8 +784,7 @@ class ModelAdmin(BaseModelAdmin):
"""
# 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
=
[]
...
...
django/contrib/admin/views/main.py
Dosyayı görüntüle @
27404835
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.core.urlresolvers import reverse
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 @@ IGNORED_PARAMS = (
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 @@ class ChangeList(object):
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
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment