summaryrefslogtreecommitdiff
path: root/app/notes/models.py
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2018-01-21 11:08:43 -0700
committerluxagraf <sng@luxagraf.net>2018-01-21 11:08:43 -0700
commit342e3f0450f2a13fe3f2c99d0cc28d053592293e (patch)
treefb58e7b2b3a1659315162bf7028fd94afd888b6b /app/notes/models.py
parent7dbb0c01c941f933914ff0f0d5567a4a7ac7e99c (diff)
updated code to work with django 2.0
Diffstat (limited to 'app/notes/models.py')
-rw-r--r--app/notes/models.py4
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)