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
617505ca
Kaydet (Commit)
617505ca
authored
Haz 27, 2017
tarafından
Mariusz Felisiak
Kaydeden (comit)
Tim Graham
Haz 27, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #28330 -- Prevented passing positional arguments to an Index.
Thanks Tim Graham for the review.
üst
d381914a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
7 deletions
+18
-7
indexes.py
django/contrib/postgres/indexes.py
+4
-4
indexes.py
django/db/models/indexes.py
+1
-1
indexes.txt
docs/ref/contrib/postgres/indexes.txt
+2
-2
2.0.txt
docs/releases/2.0.txt
+11
-0
No files found.
django/contrib/postgres/indexes.py
Dosyayı görüntüle @
617505ca
...
...
@@ -11,11 +11,11 @@ class BrinIndex(Index):
# applicable.
max_name_length
=
31
def
__init__
(
self
,
fields
=
[],
name
=
None
,
pages_per_range
=
None
):
def
__init__
(
self
,
*
,
pages_per_range
=
None
,
**
kwargs
):
if
pages_per_range
is
not
None
and
pages_per_range
<=
0
:
raise
ValueError
(
'pages_per_range must be None or a positive integer'
)
self
.
pages_per_range
=
pages_per_range
super
()
.
__init__
(
fields
,
name
)
super
()
.
__init__
(
**
kwargs
)
def
deconstruct
(
self
):
path
,
args
,
kwargs
=
super
()
.
deconstruct
()
...
...
@@ -33,10 +33,10 @@ class BrinIndex(Index):
class
GinIndex
(
Index
):
suffix
=
'gin'
def
__init__
(
self
,
fields
=
[],
name
=
None
,
fastupdate
=
None
,
gin_pending_list_limit
=
None
):
def
__init__
(
self
,
*
,
fastupdate
=
None
,
gin_pending_list_limit
=
None
,
**
kwargs
):
self
.
fastupdate
=
fastupdate
self
.
gin_pending_list_limit
=
gin_pending_list_limit
super
()
.
__init__
(
fields
,
name
)
super
()
.
__init__
(
**
kwargs
)
def
deconstruct
(
self
):
path
,
args
,
kwargs
=
super
()
.
deconstruct
()
...
...
django/db/models/indexes.py
Dosyayı görüntüle @
617505ca
...
...
@@ -11,7 +11,7 @@ class Index:
# cross-database compatibility with Oracle)
max_name_length
=
30
def
__init__
(
self
,
fields
=
[],
name
=
None
):
def
__init__
(
self
,
*
,
fields
=
[],
name
=
None
):
if
not
isinstance
(
fields
,
list
):
raise
ValueError
(
'Index.fields must be a list.'
)
if
not
fields
:
...
...
docs/ref/contrib/postgres/indexes.txt
Dosyayı görüntüle @
617505ca
...
...
@@ -12,7 +12,7 @@ available from the ``django.contrib.postgres.indexes`` module.
``BrinIndex``
=============
.. class:: BrinIndex(
fields=[], name=None, pages_per_range=None
)
.. class:: BrinIndex(
pages_per_range=None, **options
)
Creates a `BRIN index
<https://www.postgresql.org/docs/current/static/brin-intro.html>`_.
...
...
@@ -22,7 +22,7 @@ available from the ``django.contrib.postgres.indexes`` module.
``GinIndex``
============
.. class:: GinIndex(f
ields=[], name=None, fastupdate=None, gin_pending_list_limit=None
)
.. class:: GinIndex(f
astupdate=None, gin_pending_list_limit=None, **options
)
Creates a `gin index
<https://www.postgresql.org/docs/current/static/gin.html>`_.
...
...
docs/releases/2.0.txt
Dosyayı görüntüle @
617505ca
...
...
@@ -404,6 +404,17 @@ For custom management commands that use options not created using
class MyCommand(BaseCommand):
stealth_options = ('option_name', ...)
Indexes no longer accept positional arguments
---------------------------------------------
For example::
models.Index(['headline', '-pub_date'], 'index_name')
raises an exception and should be replaced with::
models.Index(fields=['headline', '-pub_date'], name='index_name')
Miscellaneous
-------------
...
...
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