Cascade on delete

This commit is contained in:
Zak Timson 2017-08-18 22:28:09 -04:00
parent 5f71498d26
commit 1b8c461cc1

View File

@ -15,7 +15,7 @@ class Newsletter(models.Model):
class Subscriber(models.Model): class Subscriber(models.Model):
user = models.OneToOneField(User) user = models.OneToOneField(User, on_delete=models.CASCADE)
subscribed = models.BooleanField(default=False) subscribed = models.BooleanField(default=False)
def __str__(self): def __str__(self):