Cascade on delete
This commit is contained in:
parent
5f71498d26
commit
1b8c461cc1
@ -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):
|
||||||
|
Loading…
Reference in New Issue
Block a user