From e6e1b272057dc7e0d4e02bb91a98285063ef8853 Mon Sep 17 00:00:00 2001 From: Brian Kohan Date: Thu, 10 Jul 2025 16:47:03 -0700 Subject: [PATCH 1/2] add django-admin crossreference --- README.rst | 2 +- sphinxcontrib_django/roles.py | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index b7b200a..99973e6 100644 --- a/README.rst +++ b/README.rst @@ -43,7 +43,7 @@ Improvements for the output of Sphinx's autodoc for Django classes: * Add information about autogenerated methods * Fix intersphinx mappings to Django modules * Custom text roles to cross-reference the documentations of Django (``:setting:``, - ``:templatetag:``, ``:templatefilter:``, ``:fieldlookup:``) and Sphinx (``:event:``, + ``:templatetag:``, ``:templatefilter:``, ``:fieldlookup:``, ``:djadmin:``) and Sphinx (``:event:``, ``:confval:``) diff --git a/sphinxcontrib_django/roles.py b/sphinxcontrib_django/roles.py index 8f66d12..2580a96 100644 --- a/sphinxcontrib_django/roles.py +++ b/sphinxcontrib_django/roles.py @@ -54,7 +54,13 @@ def setup(app: sphinx.application.Sphinx) -> dict: app.connect("config-inited", add_default_intersphinx_mappings) # Allow intersphinx mappings to custom Django roles - django_crossref_types = ["setting", "templatetag", "templatefilter", "fieldlookup"] + django_crossref_types = [ + "setting", + "templatetag", + "templatefilter", + "fieldlookup", + "django-admin", + ] # Allow intersphinx mappings to custom Sphinx roles sphinx_crossref_types = ["event", "confval"] From 2399f3153756006d11ece9dc76761c145748d20f Mon Sep 17 00:00:00 2001 From: Brian Kohan Date: Thu, 10 Jul 2025 16:50:34 -0700 Subject: [PATCH 2/2] use django-admin naming instead of django internal djadmin --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 99973e6..bc01922 100644 --- a/README.rst +++ b/README.rst @@ -43,7 +43,7 @@ Improvements for the output of Sphinx's autodoc for Django classes: * Add information about autogenerated methods * Fix intersphinx mappings to Django modules * Custom text roles to cross-reference the documentations of Django (``:setting:``, - ``:templatetag:``, ``:templatefilter:``, ``:fieldlookup:``, ``:djadmin:``) and Sphinx (``:event:``, + ``:templatetag:``, ``:templatefilter:``, ``:fieldlookup:``, ``:django-admin:``) and Sphinx (``:event:``, ``:confval:``)