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/books/models.py | |
parent | 7dbb0c01c941f933914ff0f0d5567a4a7ac7e99c (diff) |
updated code to work with django 2.0
Diffstat (limited to 'app/books/models.py')
-rw-r--r-- | app/books/models.py | 4 |
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() |