summaryrefslogtreecommitdiff
path: root/app/books/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/books/models.py
parent7dbb0c01c941f933914ff0f0d5567a4a7ac7e99c (diff)
updated code to work with django 2.0
Diffstat (limited to 'app/books/models.py')
-rw-r--r--app/books/models.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/books/models.py b/app/books/models.py
index 4362bc9..f888480 100644
--- a/app/books/models.py
+++ b/app/books/models.py
@@ -1,5 +1,5 @@
from django.db import models
-from django.core.urlresolvers import reverse
+from django.urls import reverse
from django.utils.encoding import force_text
from django.conf import settings
from django.template.defaultfilters import slugify
@@ -69,7 +69,7 @@ class Book(models.Model):
class BookHighlight(models.Model):
- book = models.ForeignKey(Book)
+ book = models.ForeignKey(Book, on_delete=models.CASCADE)
page = models.PositiveSmallIntegerField(null=True)
location = models.CharField(max_length=200, blank=True, null=True)
date_added = models.DateTimeField()