From 2995aeab56d661663e2851b29bba1fc20c2541f0 Mon Sep 17 00:00:00 2001 From: Willem Van Onsem Date: Sun, 21 Apr 2024 20:06:12 +0200 Subject: Fixed #35393 -- Added excluded pk as a hidden field to the inline admin. --- tests/admin_inlines/models.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tests/admin_inlines/models.py') diff --git a/tests/admin_inlines/models.py b/tests/admin_inlines/models.py index 5a85556a55..64aaca8d14 100644 --- a/tests/admin_inlines/models.py +++ b/tests/admin_inlines/models.py @@ -3,6 +3,7 @@ Testing of admin inline formsets. """ import random +import uuid from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType @@ -399,3 +400,13 @@ class BothVerboseNameProfile(Profile): class Meta: verbose_name = "Model with both - name" verbose_name_plural = "Model with both - plural name" + + +class UUIDParent(models.Model): + pass + + +class UUIDChild(models.Model): + id = models.UUIDField(default=uuid.uuid4, primary_key=True) + title = models.CharField(max_length=128) + parent = models.ForeignKey(UUIDParent, on_delete=models.CASCADE) -- cgit v1.3