#17: models.py: Add on_delete=CASCADE for User foreign key;
This commit is contained in:
parent
e49e3ccba9
commit
c22bbd97a0
1 changed files with 1 additions and 1 deletions
|
|
@ -10,6 +10,6 @@ class TwitterProfile(models.Model):
|
||||||
oauth_secret in relation to a user. Adapt this if you have a current
|
oauth_secret in relation to a user. Adapt this if you have a current
|
||||||
setup, there's really nothing special going on here.
|
setup, there's really nothing special going on here.
|
||||||
"""
|
"""
|
||||||
user = models.OneToOneField(User)
|
user = models.OneToOneField(User, on_delete=models.CASCADE)
|
||||||
oauth_token = models.CharField(max_length=200)
|
oauth_token = models.CharField(max_length=200)
|
||||||
oauth_secret = models.CharField(max_length=200)
|
oauth_secret = models.CharField(max_length=200)
|
||||||
|
|
|
||||||
Reference in a new issue