1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

Fixed #33029 -- Allowed multiple popups for self-related fields in admin.

This commit is contained in:
Yash Jhunjhunwala
2021-09-01 17:31:40 +05:30
committed by Carlton Gibson
parent 37d9ea5d5c
commit 492ed60f23
5 changed files with 140 additions and 9 deletions

View File

@@ -1050,3 +1050,9 @@ class ReadOnlyRelatedField(models.Model):
class Héllo(models.Model):
pass
class Box(models.Model):
title = models.CharField(max_length=100)
next_box = models.ForeignKey("self", null=True, on_delete=models.SET_NULL, blank=True)
next_box = models.ForeignKey("self", null=True, on_delete=models.SET_NULL, blank=True)