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
c79852ac
Kaydet (Commit)
c79852ac
authored
Ock 29, 2016
tarafından
Alexander Gaevsky
Kaydeden (comit)
Tim Graham
Ock 30, 2016
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #14402 -- Removed clearing of help_text for ManyToManyField's raw_id_fields.
üst
9644e2e9
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
2 deletions
+12
-2
options.py
django/contrib/admin/options.py
+0
-1
models.py
tests/admin_widgets/models.py
+6
-1
tests.py
tests/admin_widgets/tests.py
+6
-0
No files found.
django/contrib/admin/options.py
Dosyayı görüntüle @
c79852ac
...
...
@@ -242,7 +242,6 @@ class BaseModelAdmin(six.with_metaclass(forms.MediaDefiningClass)):
if
db_field
.
name
in
self
.
raw_id_fields
:
kwargs
[
'widget'
]
=
widgets
.
ManyToManyRawIdWidget
(
db_field
.
remote_field
,
self
.
admin_site
,
using
=
db
)
kwargs
[
'help_text'
]
=
''
elif
db_field
.
name
in
(
list
(
self
.
filter_vertical
)
+
list
(
self
.
filter_horizontal
)):
kwargs
[
'widget'
]
=
widgets
.
FilteredSelectMultiple
(
db_field
.
verbose_name
,
...
...
tests/admin_widgets/models.py
Dosyayı görüntüle @
c79852ac
...
...
@@ -68,7 +68,12 @@ class Event(models.Model):
limit_choices_to
=
models
.
Q
(
pk__gt
=
0
),
related_name
=
'events_main_band_at'
,
)
supporting_bands
=
models
.
ManyToManyField
(
Band
,
blank
=
True
,
related_name
=
'events_supporting_band_at'
)
supporting_bands
=
models
.
ManyToManyField
(
Band
,
blank
=
True
,
related_name
=
'events_supporting_band_at'
,
help_text
=
'Supporting Bands.'
,
)
start_date
=
models
.
DateField
(
blank
=
True
,
null
=
True
)
start_time
=
models
.
TimeField
(
blank
=
True
,
null
=
True
)
description
=
models
.
TextField
(
blank
=
True
)
...
...
tests/admin_widgets/tests.py
Dosyayı görüntüle @
c79852ac
...
...
@@ -1255,6 +1255,12 @@ class AdminRawIdWidgetSeleniumFirefoxTests(SeleniumDataMixin, AdminSeleniumWebDr
self
.
selenium
.
find_element_by_id
(
'id_supporting_bands'
)
.
get_attribute
(
'value'
),
''
)
# Help text for the field is displayed
self
.
assertEqual
(
self
.
selenium
.
find_element_by_css_selector
(
'.field-supporting_bands p.help'
)
.
text
,
'Supporting Bands.'
)
# Open the popup window and click on a band
self
.
selenium
.
find_element_by_id
(
'lookup_id_supporting_bands'
)
.
click
()
self
.
wait_for_popup
()
...
...
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