From 29c8ad663767ec9c269007281c8e1d589b634e70 Mon Sep 17 00:00:00 2001 From: Sergey Fedoseev Date: Tue, 30 Oct 2018 16:22:50 +0500 Subject: [PATCH] Fix reference in ModelAdmin.ordering docs. --- docs/conf.py | 6 ++++++ docs/reference/contrib/modeladmin/indexview.rst | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index dd5072e8ec..3ab0ed8ff0 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -51,6 +51,7 @@ os.environ['DATABASE_ENGINE'] = 'django.db.backends.sqlite3' # ones. extensions = [ 'sphinx.ext.autodoc', + 'sphinx.ext.intersphinx', ] if not on_rtd: @@ -128,6 +129,11 @@ pygments_style = 'sphinx' spelling_lang = 'en_GB' spelling_word_list_filename='spelling_wordlist.txt' +# sphinx.ext.intersphinx settings +intersphinx_mapping = { + 'django': ('https://docs.djangoproject.com/en/stable/', 'https://docs.djangoproject.com/en/stable/_objects/') +} + # -- Options for HTML output ---------------------------------------------- diff --git a/docs/reference/contrib/modeladmin/indexview.rst b/docs/reference/contrib/modeladmin/indexview.rst index f7d2711ebc..b3d23a9e75 100644 --- a/docs/reference/contrib/modeladmin/indexview.rst +++ b/docs/reference/contrib/modeladmin/indexview.rst @@ -304,7 +304,7 @@ your project is using, and without any additional setup or configuration. --------------------------- **Expected value**: A list or tuple in the same format as a model’s -[``ordering``](https://docs.djangoproject.com/en/stable/ref/contrib/admin/#django.contrib.admin.ModelAdmin.list_display) parameter. +:attr:`~django.db.models.Options.ordering` parameter. Set ``ordering`` to specify the default ordering of objects when listed by IndexView. If not provided, the model’s default ordering will be respected.