Skip to content

DOCSP-48767: Intersphinx links #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions source/connect.txt
Original file line number Diff line number Diff line change
@@ -146,11 +146,11 @@ function accepts the following arguments:
- ``db_name``: The name of the database you want to use.
- ``conn_max_age``: Configures persistent database connections.
This argument is optional. To learn more, see
`Persistent connections <{+django-docs+}/ref/databases/#persistent-database-connections>`__
:std:ext-doc:`Persistent connections <databases/#persistent-database-connections>`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd expect this syntax (if MongoDB docs team didn't implement something different):

:ref:`Persistent connections <django:persistent-database-connections>`

(You can browse https://github.com/mongodb/django-mongodb-backend/tree/main/docs/source to see some working examples.)

Beware that the djadmin, lookup, setting roles require some custom configuration.

in the {+framework+} documentation.
- ``test``: Provides a dictionary of settings for test
databases. This argument is optional. To learn more, see
`the TEST setting <{+django-docs+}/ref/settings/#test>`__
:std:ext-doc:`the TEST setting <ref//settings/#test>`
in the {+framework+} documentation.

Example
2 changes: 1 addition & 1 deletion source/get-started/create-admin.txt
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ Create an Admin Site

You can create a {+framework+} admin site to edit your application's
data from a web interface. To learn more about the {+framework+} admin
site and its features, see `The Django admin site <{+django-docs+}/ref/contrib/admin/>`__
site and its features, see :py:mod:`The Django admin site <django.contrib.admin>`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it work without the :py prefix? I've never needed that, and I don't think we're likely to run into collisions with other domains, but I'm not quite sure.

in the {+framework+} documentation.

.. procedure::
26 changes: 13 additions & 13 deletions source/interact-data/specify-a-query.txt
Original file line number Diff line number Diff line change
@@ -257,9 +257,9 @@ expression matching, and year value matching for datetime fields.

.. tip::

To view a full list of lookup types, see `Field lookups
<{+django-docs+}/ref/models/querysets/#field-lookups>`__ in the
``QuerySet`` {+framework+} API reference.
To view a full list of lookup types, see
:std:ext-doc:`Field lookups <ref/models/querysets/#field-lookups>`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You cannot use an anchor like #field-lookups like this. If you want to link to a specific section, use :ref:, otherwise if you want to link to the document, use :doc:

in the ``QuerySet`` {+framework+} API reference.

This section describes how to refine your query filters
in the following ways:
@@ -397,18 +397,17 @@ You can run queries that use multiple sets of matching criteria
in the following ways:

- Pass multiple query filters to your query method, separated
by commas. To view an example, see `Retrieving objects
<{+django-docs+}/topics/db/queries/#retrieving-objects>`__ in the
{+framework+} documentation.
by commas. To view an example, see
:std:ext-doc:`Django's LOGGING setting <topics/db/queries/#retrieving-objects>`
in the {+framework+} documentation.

- Chain query methods together. To learn more, see `Chaining filters
<{+django-docs+}/topics/db/queries/#chaining-filters>`__ in the {+framework+}
documentation.
- Chain query methods together. To learn more, see
:std:ext-doc:`Chaining filters <topics/db/queries/#chaining-filters>`
in the {+framework+} documentation.

- Use ``Q`` objects and separate each object with a logical operator.
To learn more, see `Complex lookups with Q objects
<{+django-docs+}/topics/db/queries/#complex-lookups-with-q-objects>`__ in the {+framework+}
documentation.
To learn more, see :std:ext-doc:`Complex lookups with Q objects <topics/db/queries/#complex-lookups-with-q-objects>`
in the {+framework+} documentation.

Q Object Example
````````````````
@@ -814,5 +813,6 @@ pipeline syntax, see the :ref:`django-raw-queries` guide.
To learn how to perform other ``QuerySet`` operations, see the
:ref:`django-crud` guide.

To learn more about {+framework+} queries, see `Making queries <{+django-docs+}/topics/db/queries>`__
To learn more about {+framework+} queries, see
:std:ext-doc:`Making queries <topics/db/queries>`
in the {+framework+} documentation.
4 changes: 2 additions & 2 deletions source/limitations-upcoming.txt
Original file line number Diff line number Diff line change
@@ -115,7 +115,7 @@ Fields
``$lookup`` operations, see the :atlas:`Reduce $lookup Operations
</schema-suggestions/reduce-lookup-operations/>` guide in the Atlas
documentation.
- Performance of `CASCADE deletes <{+django-docs+}/ref/models/fields/#django.db.models.CASCADE>`__
- Performance of :py:mod:`CASCADE deletes <django.db.models.CASCADE>`
on a ``ForeignKey`` field is not as performant as using an
``EmbeddedModelField``.

@@ -196,7 +196,7 @@ Migration Limitations
validation in your application, see the :manual:`Specify JSON
Schema Validation </core/schema-validation/specify-json-schema/>` guide in the
{+mdb-server+} manual.
- `DDL Transactions <{+django-docs+}/topics/migrations/#transactions>`__.
- :std:ext-doc:`DDL Transactions <topics/migrations/#transactions>`
- The ``migrate --fake-initial`` option.

.. _django-limitations-performance:
7 changes: 4 additions & 3 deletions source/model-data/indexes.txt
Original file line number Diff line number Diff line change
@@ -92,8 +92,9 @@ same indexes on the MongoDB collection.

.. tip::

To learn how to create and apply database migrations, see `Migrations
<{+django-docs+}/topics/migrations/>`__ in the {+framework+} documentation.
To learn how to create and apply database migrations, see
:std:ext-doc:`Migrations <topics/migrations>` in the
{+framework+} documentation.

This section shows how to create the following index types:

@@ -280,7 +281,7 @@ creates a unique compound index on these fields:

Setting the ``constraints`` option to a ``UniqueConstraint`` automatically
creates an index on the specified fields. To learn more about the ``Meta``
class's ``constraint`` option, see `Constraints <{+django-docs+}/ref/models/constraints/>`__
class's ``constraint`` option, see :std:ext-doc:`Constraints <ref/models/constraints>`
in the {+framework+} documentation.

Additional Information
6 changes: 3 additions & 3 deletions source/model-data/models.txt
Original file line number Diff line number Diff line change
@@ -237,7 +237,7 @@ define a model:
.. tip::

To learn more about the metadata options you can specify
in the ``Meta`` class, see `Model Meta options <{+django-docs+}/ref/models/options/>`__
in the ``Meta`` class, see :py:attr:`Model Meta options <django.db.models.Options>`
in the {+framework+} documentation.

To use your models, you must add them to your project's
@@ -376,8 +376,8 @@ and pass the following arguments:
- ``size``: *(Optional)* Specifies the maximum size of the array.

- ``options``: *(Optional)* Specifies {+framework+} field options.
To view a list of available options, see `Field options
<{+django-docs+}/ref/models/fields/#field-options>`__
To view a list of available options, see
:std:ext-doc:`Field options <ref/models/fields/#field-options>`
in the {+framework+} documentation.

.. tip::
25 changes: 25 additions & 0 deletions source/temp.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
======================
Test Intersphinx Links
======================

1. :std:ext-doc:`Persistent connections <databases/#persistent-database-connections>`
#. :py:mod:`django.databases.persistent-database-connections`
#. :py:mod:`django.settings.CONN_MAX_AGE`

1. :std:ext-doc:`the TEST setting <ref/settings/#test>`
#. :py:mod:`django.settings.test`

1. :py:mod:`django.contrib.admin`

1. :std:ext-doc:`Field lookups <ref/models/querysets/#field-lookups>`
#. :py:attr:`django.db.models.field-lookups`
#. :py:attr:`~django.db.models.field-lookups`
#. :py:mod:`django.db.models.field-lookups`
#. :py:mod:`~django.db.models.field-lookups`

1. :py:attr:`django.db.models.Field`
#. :py:attr:`~django.db.models.Field`
#. :py:attr:`django.db.models`
#. :py:mod:`django.db.models`
#. :py:mod:`django.db.models.Field`
#. :py:mod:`~django.db.models.Field`