1
0
mirror of https://github.com/django/django.git synced 2025-10-28 08:06:09 +00:00

Fixed #35393 -- Added excluded pk as a hidden field to the inline admin.

This commit is contained in:
Willem Van Onsem
2024-04-21 20:06:12 +02:00
committed by Sarah Boyce
parent c7fc9f20b4
commit 2995aeab56
4 changed files with 44 additions and 0 deletions

View File

@@ -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)