mirror of
https://github.com/django/django.git
synced 2025-11-25 21:22:14 +00:00
Fixed #13165 -- Added edit and delete links to admin foreign key widgets.
Thanks to Collin Anderson for the review and suggestions and Tim for the final review.
This commit is contained in:
parent
48ad288679
commit
07988744b3
17 changed files with 427 additions and 70 deletions
|
|
@ -108,7 +108,8 @@ class Individual(models.Model):
|
|||
related instances (rendering will be called programmatically in this case).
|
||||
"""
|
||||
name = models.CharField(max_length=20)
|
||||
parent = models.ForeignKey('self', null=True)
|
||||
parent = models.ForeignKey('self', null=True, on_delete=models.SET_NULL)
|
||||
soulmate = models.ForeignKey('self', null=True, on_delete=models.CASCADE, related_name='soulmates')
|
||||
|
||||
|
||||
class Company(models.Model):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue