mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField
This commit is contained in:
committed by
Tim Graham
parent
87d55081ea
commit
c2e70f0265
@@ -38,8 +38,8 @@ class Person(models.Model):
|
||||
"""
|
||||
first_name = models.CharField(max_length=200, help_text="The person's first name")
|
||||
last_name = models.CharField(max_length=200, help_text="The person's last name")
|
||||
company = models.ForeignKey(Company, help_text="place of work")
|
||||
family = models.ForeignKey(Family, related_name='+', null=True)
|
||||
company = models.ForeignKey(Company, models.CASCADE, help_text="place of work")
|
||||
family = models.ForeignKey(Family, models.SET_NULL, related_name='+', null=True)
|
||||
groups = models.ManyToManyField(Group, help_text="has membership")
|
||||
|
||||
def _get_full_name(self):
|
||||
|
||||
Reference in New Issue
Block a user