From 617505ca892fc84c7be1c224ebca2c27f93e8f50 Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Tue, 27 Jun 2017 19:39:37 +0200 Subject: Fixed #28330 -- Prevented passing positional arguments to an Index. Thanks Tim Graham for the review. --- docs/ref/contrib/postgres/indexes.txt | 4 ++-- docs/releases/2.0.txt | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/ref/contrib/postgres/indexes.txt b/docs/ref/contrib/postgres/indexes.txt index e364f8d83e..d055a381c5 100644 --- a/docs/ref/contrib/postgres/indexes.txt +++ b/docs/ref/contrib/postgres/indexes.txt @@ -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 `_. @@ -22,7 +22,7 @@ available from the ``django.contrib.postgres.indexes`` module. ``GinIndex`` ============ -.. class:: GinIndex(fields=[], name=None, fastupdate=None, gin_pending_list_limit=None) +.. class:: GinIndex(fastupdate=None, gin_pending_list_limit=None, **options) Creates a `gin index `_. diff --git a/docs/releases/2.0.txt b/docs/releases/2.0.txt index cd1970f08f..0b51736768 100644 --- a/docs/releases/2.0.txt +++ b/docs/releases/2.0.txt @@ -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 ------------- -- cgit v1.3