diff options
| author | Willem Van Onsem <vanonsem.willem@gmail.com> | 2024-04-21 20:06:12 +0200 |
|---|---|---|
| committer | Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> | 2024-05-22 10:31:24 +0200 |
| commit | 2995aeab56d661663e2851b29bba1fc20c2541f0 (patch) | |
| tree | c7f848187fca162008d0e62fc5a21ff8a834352b /tests/admin_inlines/models.py | |
| parent | c7fc9f20b49b5889a9a8f47de45165ac443c1a21 (diff) | |
Fixed #35393 -- Added excluded pk as a hidden field to the inline admin.
Diffstat (limited to 'tests/admin_inlines/models.py')
| -rw-r--r-- | tests/admin_inlines/models.py | 11 |
1 files changed, 11 insertions, 0 deletions
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) |
