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
47bb3b68
Kaydet (Commit)
47bb3b68
authored
Mar 15, 2018
tarafından
David Sanders
Kaydeden (comit)
Tim Graham
Mar 15, 2018
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #29219 -- Made admin filters use processed params rather than request.GET.
üst
a2f7433a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
filters.py
django/contrib/admin/filters.py
+8
-8
No files found.
django/contrib/admin/filters.py
Dosyayı görüntüle @
47bb3b68
...
...
@@ -164,8 +164,8 @@ class RelatedFieldListFilter(FieldListFilter):
other_model
=
get_model_from_relation
(
field
)
self
.
lookup_kwarg
=
'
%
s__
%
s__exact'
%
(
field_path
,
field
.
target_field
.
name
)
self
.
lookup_kwarg_isnull
=
'
%
s__isnull'
%
field_path
self
.
lookup_val
=
request
.
GET
.
get
(
self
.
lookup_kwarg
)
self
.
lookup_val_isnull
=
request
.
GET
.
get
(
self
.
lookup_kwarg_isnull
)
self
.
lookup_val
=
params
.
get
(
self
.
lookup_kwarg
)
self
.
lookup_val_isnull
=
params
.
get
(
self
.
lookup_kwarg_isnull
)
super
()
.
__init__
(
field
,
request
,
params
,
model
,
model_admin
,
field_path
)
self
.
lookup_choices
=
self
.
field_choices
(
field
,
request
,
model_admin
)
if
hasattr
(
field
,
'verbose_name'
):
...
...
@@ -223,8 +223,8 @@ class BooleanFieldListFilter(FieldListFilter):
def
__init__
(
self
,
field
,
request
,
params
,
model
,
model_admin
,
field_path
):
self
.
lookup_kwarg
=
'
%
s__exact'
%
field_path
self
.
lookup_kwarg2
=
'
%
s__isnull'
%
field_path
self
.
lookup_val
=
request
.
GET
.
get
(
self
.
lookup_kwarg
)
self
.
lookup_val2
=
request
.
GET
.
get
(
self
.
lookup_kwarg2
)
self
.
lookup_val
=
params
.
get
(
self
.
lookup_kwarg
)
self
.
lookup_val2
=
params
.
get
(
self
.
lookup_kwarg2
)
super
()
.
__init__
(
field
,
request
,
params
,
model
,
model_admin
,
field_path
)
if
(
self
.
used_parameters
and
self
.
lookup_kwarg
in
self
.
used_parameters
and
self
.
used_parameters
[
self
.
lookup_kwarg
]
in
(
'1'
,
'0'
)):
...
...
@@ -261,8 +261,8 @@ class ChoicesFieldListFilter(FieldListFilter):
def
__init__
(
self
,
field
,
request
,
params
,
model
,
model_admin
,
field_path
):
self
.
lookup_kwarg
=
'
%
s__exact'
%
field_path
self
.
lookup_kwarg_isnull
=
'
%
s__isnull'
%
field_path
self
.
lookup_val
=
request
.
GET
.
get
(
self
.
lookup_kwarg
)
self
.
lookup_val_isnull
=
request
.
GET
.
get
(
self
.
lookup_kwarg_isnull
)
self
.
lookup_val
=
params
.
get
(
self
.
lookup_kwarg
)
self
.
lookup_val_isnull
=
params
.
get
(
self
.
lookup_kwarg_isnull
)
super
()
.
__init__
(
field
,
request
,
params
,
model
,
model_admin
,
field_path
)
def
expected_parameters
(
self
):
...
...
@@ -372,8 +372,8 @@ class AllValuesFieldListFilter(FieldListFilter):
def
__init__
(
self
,
field
,
request
,
params
,
model
,
model_admin
,
field_path
):
self
.
lookup_kwarg
=
field_path
self
.
lookup_kwarg_isnull
=
'
%
s__isnull'
%
field_path
self
.
lookup_val
=
request
.
GET
.
get
(
self
.
lookup_kwarg
)
self
.
lookup_val_isnull
=
request
.
GET
.
get
(
self
.
lookup_kwarg_isnull
)
self
.
lookup_val
=
params
.
get
(
self
.
lookup_kwarg
)
self
.
lookup_val_isnull
=
params
.
get
(
self
.
lookup_kwarg_isnull
)
self
.
empty_value_display
=
model_admin
.
get_empty_value_display
()
parent_model
,
reverse_path
=
reverse_field_path
(
model
,
field_path
)
# Obey parent ModelAdmin queryset when deciding which options to show
...
...
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