diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-06-03 11:01:15 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-03 12:01:15 +0200 |
| commit | 1136aa5005f0ae70fea12796b7e37d6f027b9263 (patch) | |
| tree | 7f1cb67e53e0a4ddc8d48c432ab9d4a09260f172 /docs | |
| parent | 7d96ce68ae2c1bab1f2ab64ddc2b2c6004278af0 (diff) | |
Refs #23528 -- Made cosmetic edits to swappable_dependency() docs.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/topics/migrations.txt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/topics/migrations.txt b/docs/topics/migrations.txt index f2d2d915c1..2ee7e53f47 100644 --- a/docs/topics/migrations.txt +++ b/docs/topics/migrations.txt @@ -224,14 +224,14 @@ Swappable dependencies .. function:: django.db.migrations.swappable_dependency(value) The ``swappable_dependency()`` function is used in migrations to declare -"swappable" dependencies on migrations in the app of the swapped-in model. -Currently, the first migration of this app and as a consequence the swapped-in +"swappable" dependencies on migrations in the app of the swapped-in model, +currently, on the first migration of this app. As a consequence, the swapped-in model should be created in the initial migration. The argument ``value`` is a string ``"<app label>.<model>"`` describing an app label and a model name, e.g. ``"myapp.MyModel"``. By using ``swappable_dependency()``, you inform the migration framework that -the migration relies on a migration which sets up up a swappable model, +the migration relies on another migration which sets up a swappable model, allowing for the possibility of substituting the model with a different implementation in the future. This is typically used for referencing models that are subject to customization or replacement, such as the custom user |
