summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorAri Pollak <aripollak@users.noreply.github.com>2024-12-23 16:26:01 -0500
committerSarah Boyce <42296566+sarahboyce@users.noreply.github.com>2025-01-02 15:25:59 +0100
commitad385ae163da2b1c558f62c0415db5aa03227587 (patch)
tree9d4bb4795835555e34d2bca81b2ea160b31af363 /docs/ref
parent82b913cd6c95e9d5161f9fec599538c46571a72e (diff)
Fixed #36037 -- Fixed default primary key type in docs.
BigAutoField is the default type for primary keys. In models.txt, the linked anchor shows that the default primary key is a BigAutoField, so it now defers to that section instead of duplicating an (incorrect) type.
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/contrib/contenttypes.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/ref/contrib/contenttypes.txt b/docs/ref/contrib/contenttypes.txt
index ff0688d4ac..18eaff43b2 100644
--- a/docs/ref/contrib/contenttypes.txt
+++ b/docs/ref/contrib/contenttypes.txt
@@ -261,7 +261,7 @@ For example, it could be used for a tagging system like so::
class TaggedItem(models.Model):
tag = models.SlugField()
content_type = models.ForeignKey(ContentType, on_delete=models.CASCADE)
- object_id = models.PositiveIntegerField()
+ object_id = models.PositiveBigIntegerField()
content_object = GenericForeignKey("content_type", "object_id")
def __str__(self):
@@ -291,7 +291,7 @@ model:
2. Give your model a field that can store primary key values from the
models you'll be relating to. For most models, this means a
- :class:`~django.db.models.PositiveIntegerField`. The usual name
+ :class:`~django.db.models.PositiveBigIntegerField`. The usual name
for this field is "object_id".
3. Give your model a