Skip to content

Commit 0d5f19f

Browse files
committed
fix #221
1 parent dbbe705 commit 0d5f19f

File tree

8 files changed

+932
-927
lines changed

8 files changed

+932
-927
lines changed

doc/source/changelog.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
Change Log
55
==========
66

7+
v3.2.1 (2025-07-16)
8+
===================
9+
10+
* Docs `Add django-admin role for shellcompletion reference. <https://github.com/django-commons/django-typer/issues/221>`_
11+
712
v3.2.0 (2025-05-31)
813
===================
914

doc/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def setup(app):
118118
# app.connect('html-page-context', add_page_class)
119119

120120
app.add_directive("literalinclude", ExtendedLiteralInclude)
121-
121+
app.add_crossref_type(directivename="django-admin", rolename="django-admin")
122122
# https://sphinxcontrib-typer.readthedocs.io/en/latest/howto.html#build-to-multiple-formats
123123
if Path(app.doctreedir).exists():
124124
shutil.rmtree(app.doctreedir)

doc/source/reference/shell_completion.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@
66
Shell Completion
77
================
88

9+
.. django-admin:: shellcompletion
10+
911
.. automodule:: django_typer.management.commands.shellcompletion
1012
:members:

doc/source/shell_completion.rst

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ for django commands we need to register our completion logic for Django manage s
5353
the shell. This process has two phases:
5454

5555
1. Ensure that your shell is configured to support completions.
56-
2. Use the :mod:`~django_typer.management.commands.shellcompletion` command to install the
57-
completion hook for your Django manage script. This usually entails adding a specifically
58-
named script to a certain directory or adding lines to an existing profile. The
59-
:mod:`~django_typer.management.commands.shellcompletion` command will handle this for you.
56+
2. Use the :django-admin:`shellcompletion` command to install the completion hook for your Django
57+
manage script. This usually entails adding a specifically named script to a certain directory or
58+
adding lines to an existing profile. The :django-admin:`shellcompletion` command will handle this
59+
for you.
6060

6161

6262
The goal of this guide is not to be an exhaustive list of how to enable completions for each
@@ -126,9 +126,8 @@ or have solutions, please `report them on our discussions page <https://github.c
126126
Install the Completion Hook
127127
---------------------------
128128

129-
django-typer_ comes with a management command called
130-
:mod:`~django_typer.management.commands.shellcompletion`. To install completions for your Django_
131-
project simply run the install command:
129+
django-typer_ comes with a management command called :django-admin:`shellcompletion`. To install
130+
completions for your Django_ project simply run the install command:
132131

133132
.. code-block:: bash
134133
@@ -145,8 +144,7 @@ will make and ask for permission before proceeding. To skip the prompt use** ``-
145144

146145
The installation script should be able to automatically detect your shell and install the
147146
appropriate scripts. If it is unable to do so you may force it to install for a specific shell by
148-
passing the shell name as an argument. Refer to the
149-
:mod:`~django_typer.management.commands.shellcompletion` for details.
147+
passing the shell name as an argument. Refer to the :django-admin:`shellcompletion` for details.
150148

151149
**After installation you will need to restart your shell or source the appropriate rc file.**
152150

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "django-typer"
7-
version = "3.2.0"
7+
version = "3.2.1"
88
requires-python = ">=3.9,<4.0"
99
description = "Use Typer to define the CLI for your Django management commands."
1010
authors = [

src/django_typer/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
and keep a tight version lock on Typer.
3434
"""
3535

36-
VERSION = (3, 2, 0)
36+
VERSION = (3, 2, 1)
3737

3838
__title__ = "Django Typer"
3939
__version__ = ".".join(str(i) for i in VERSION)

src/django_typer/management/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2602,7 +2602,7 @@ def command2(self, option: t.Optional[str] = None):
26022602
- Using `rich_markup_mode
26032603
<https://typer.tiangolo.com/tutorial/commands/help/#rich-markdown-and-markup>`_
26042604
to enable markdown rendering in help output.
2605-
- Using the chain parameter to enable :ref:`click:multi-command-chaining`.
2605+
- Using the chain parameter to enable :ref:`click:command-chaining`.
26062606
26072607
26082608
We can see that our help renders like so:

uv.lock

Lines changed: 914 additions & 914 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)