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
e016c4c6
Kaydet (Commit)
e016c4c6
authored
Agu 26, 2017
tarafından
Mads Jensen
Kaydeden (comit)
Tim Graham
Agu 26, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Refs #27869 -- Omitted field kwargs from GinIndex.deconstruct() if they're None.
üst
fb42d024
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
indexes.py
django/contrib/postgres/indexes.py
+4
-2
test_indexes.py
tests/postgres_tests/test_indexes.py
+7
-0
No files found.
django/contrib/postgres/indexes.py
Dosyayı görüntüle @
e016c4c6
...
...
@@ -42,8 +42,10 @@ class GinIndex(Index):
def
deconstruct
(
self
):
path
,
args
,
kwargs
=
super
()
.
deconstruct
()
kwargs
[
'fastupdate'
]
=
self
.
fastupdate
kwargs
[
'gin_pending_list_limit'
]
=
self
.
gin_pending_list_limit
if
self
.
fastupdate
is
not
None
:
kwargs
[
'fastupdate'
]
=
self
.
fastupdate
if
self
.
gin_pending_list_limit
is
not
None
:
kwargs
[
'gin_pending_list_limit'
]
=
self
.
gin_pending_list_limit
return
path
,
args
,
kwargs
def
create_sql
(
self
,
model
,
schema_editor
,
using
=
''
):
...
...
tests/postgres_tests/test_indexes.py
Dosyayı görüntüle @
e016c4c6
...
...
@@ -84,6 +84,13 @@ class GinIndexTests(PostgreSQLTestCase):
}
)
def
test_deconstruct_no_args
(
self
):
index
=
GinIndex
(
fields
=
[
'title'
],
name
=
'test_title_gin'
)
path
,
args
,
kwargs
=
index
.
deconstruct
()
self
.
assertEqual
(
path
,
'django.contrib.postgres.indexes.GinIndex'
)
self
.
assertEqual
(
args
,
())
self
.
assertEqual
(
kwargs
,
{
'fields'
:
[
'title'
],
'name'
:
'test_title_gin'
})
class
SchemaTests
(
PostgreSQLTestCase
):
...
...
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