diff options
author | luxagraf <sng@luxagraf.net> | 2018-01-21 11:08:43 -0700 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2018-01-21 11:08:43 -0700 |
commit | 342e3f0450f2a13fe3f2c99d0cc28d053592293e (patch) | |
tree | fb58e7b2b3a1659315162bf7028fd94afd888b6b /app/notes/models.py | |
parent | 7dbb0c01c941f933914ff0f0d5567a4a7ac7e99c (diff) |
updated code to work with django 2.0
Diffstat (limited to 'app/notes/models.py')
-rw-r--r-- | app/notes/models.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/notes/models.py b/app/notes/models.py index 4e7824d..698ca14 100644 --- a/app/notes/models.py +++ b/app/notes/models.py @@ -31,7 +31,7 @@ class LuxNote(models.Model): body_html = models.TextField(blank=True) body_markdown = models.TextField('Note') point = models.PointField(blank=True, null=True) - location = models.ForeignKey(Location, blank=True, null=True) + location = models.ForeignKey(Location, on_delete=models.CASCADE, blank=True, null=True) PUB_STATUS = ( (0, 'Draft'), (1, 'Published'), @@ -88,7 +88,7 @@ class Note(models.Model): date_created = models.DateTimeField('Date', blank=True) date_last_updated = models.DateTimeField('Date', blank=True) point = models.PointField() - location = models.ForeignKey(Location, null=True, blank=True) + location = models.ForeignKey(Location, on_delete=models.CASCADE, null=True, blank=True) city_name = models.CharField(max_length=250, null=True, blank=True) state_name = models.CharField(max_length=250, null=True, blank=True) country_name = models.CharField(max_length=150, null=True, blank=True) |