#
from django.db import models
-from librarian import html
from sortify import sortify
from catalogue.models import Book
def notes_from_book(sender, **kwargs):
+ from librarian import html
+
Note.objects.filter(book=sender).delete()
if sender.html_file:
for anchor, text_str, html_str in html.extract_annotations(sender.html_file.path):
from django.contrib.contenttypes import generic
from django.conf import settings
-from librarian import text
from catalogue.fields import JSONField
from catalogue.models import Book, Tag
@classmethod
def for_book(cls, book, length=3):
+ from librarian import text
+
# count from this book only
output = StringIO()
f = open(book.xml_file.path)