Skip to content

Commit

Permalink
fix(docs): rename anchor links to fix duplicates
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobCoffee committed Nov 12, 2023
1 parent d0a098c commit a476af9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ with database modeling using the included SQLAlchemy declarative model helpers.
are a series of classes and mixins that incorporate commonly used functions/column types
to make working with models easier.

.. tip:: The full code for this tutorial can be found below in the :ref:`Full Code <full-code>` section.
.. tip:: The full code for this tutorial can be found below in the :ref:`Full Code <01-repo-full-code>` section.

.. literalinclude:: /examples/contrib/sqlalchemy/sqlalchemy_declarative_models.py
:language: python
Expand Down Expand Up @@ -77,7 +77,7 @@ Additional features provided by the built-in base models include:

Let's build on this as we look at the repository classes.

.. _full-code:
.. _01-repo-full-code:

Full Code
---------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Now that we've covered the modeling basics, we are able to create our first repo
class. The repository classes include all of the standard CRUD operations as well as a
few advanced features such as pagination, filtering and bulk operations.

.. tip:: The full code for this tutorial can be found below in the :ref:`Full Code <full-code>` section.
.. tip:: The full code for this tutorial can be found below in the :ref:`Full Code <02-repo-full-code>` section.

Before we jump in to the code, let's take a look at the available functions available in
the the synchronous and asynchronous repositories.
Expand Down Expand Up @@ -216,7 +216,7 @@ Now that we have demonstrated how to interact with the repository objects outsid
Litestar application, our next example will use dependency injection to add this
functionality to a :class:`~litestar.controller.Controller`!

.. _full-code:
.. _02-repo-full-code:

Full Code
---------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ We've been working our way up the stack, starting with the database models, and
are ready to use the repository in an actual route. Let's see how we can use this in a
controller.

.. tip:: The full code for this tutorial can be found below in the :ref:`Full Code <full-code>` section.
.. tip:: The full code for this tutorial can be found below in the :ref:`Full Code <03-repo-full-code>` section.

First, we create a simple function that returns an instance of ``AuthorRepository``.
This function will be used to inject a repository instance into our controller routes.
Expand Down Expand Up @@ -63,7 +63,7 @@ The examples above enable a feature-complete CRUD service that includes paginati
the next section, we'll explore how to extend the built-in repository to add additional
functionality to our application.

.. _full-code:
.. _03-repo-full-code:

Full Code
---------
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/repository-tutorial/04-repository-other.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ While most of the functionality you need is built into the repository, there are
cases where you need to add in additional functionality. Let's explore ways that we
can add functionality on top of the repository pattern.

.. tip:: The full code for this tutorial can be found below in the :ref:`Full Code <full-code>` section.
.. tip:: The full code for this tutorial can be found below in the :ref:`Full Code <04-repo-full-code>` section.

Slug Fields
-----------
Expand Down Expand Up @@ -54,7 +54,7 @@ Finally, we insert the model with the added slug.
Using this method does introduce an additional query on each insert. This should be
considered when determining which fields actually need this type of functionality.

.. _full-code:
.. _04-repo-full-code:

Full Code
---------
Expand Down

0 comments on commit a476af9

Please sign in to comment.