Skip to content

Commit 84c1983

Browse files
committed
Add sphinx-copybutton extension to copy/paste contents of pre elements
- Remove leading shell prompts from shell examples
1 parent 839ce4e commit 84c1983

File tree

4 files changed

+7
-9
lines changed

4 files changed

+7
-9
lines changed

docs/conf.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,7 @@
3131
# (functions, classes, attributes, etc.)
3232
toc_object_entries = False
3333

34-
extensions = [
35-
"djangodocs",
36-
"sphinx.ext.intersphinx",
37-
]
34+
extensions = ["djangodocs", "sphinx.ext.intersphinx", "sphinx_copybutton"]
3835

3936
# templates_path = ["_templates"]
4037
exclude_patterns = []

docs/intro/configure.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ Specifying the default primary key field
1313
In your Django settings, you must specify that all models should use
1414
:class:`~django_mongodb_backend.fields.ObjectIdAutoField`.
1515

16-
You can create a new project that's configured based on these steps using a
17-
project template:
16+
You can create a new project that's configured with these settings by using the
17+
following :djadmin:`startproject` template:
1818

1919
.. code-block:: bash
2020
21-
$ django-admin startproject mysite --template https://github.com/mongodb-labs/django-mongodb-project/archive/refs/heads/5.2.x.zip
21+
django-admin startproject mysite --template https://github.com/mongodb-labs/django-mongodb-project/archive/refs/heads/5.2.x.zip
2222
2323
(If you're using a version of Django other than 5.2.x, replace the two numbers
2424
to match the first two numbers from your version.)
@@ -95,7 +95,7 @@ includes this change:
9595

9696
.. code-block:: bash
9797
98-
$ python manage.py startapp myapp --template https://github.com/mongodb-labs/django-mongodb-app/archive/refs/heads/5.2.x.zip
98+
python manage.py startapp myapp --template https://github.com/mongodb-labs/django-mongodb-app/archive/refs/heads/5.2.x.zip
9999
100100
(If you're using a version of Django other than 5.2.x, replace the two numbers
101101
to match the first two numbers from your version.)

docs/intro/install.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ of Django. For example, to get the latest compatible release for Django 5.2.x:
77

88
.. code-block:: bash
99
10-
$ pip install django-mongodb-backend==5.2.*
10+
pip install django-mongodb-backend==5.2.*
1111
1212
The minor release number of Django doesn't correspond to the minor release
1313
number of ``django-mongodb-backend``. Use the latest minor release of each.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ classifiers = [
3737
docs = [
3838
"sphinx>=7",
3939
"furo>=2025.7.19",
40+
"sphinx-copybutton",
4041
]
4142

4243
[project.urls]

0 commit comments

Comments
 (0)