moved stats to own app, add template tags to it,
[wolnelektury.git] / apps / dictionary / models.py
index 2606179..c0a92d1 100644 (file)
@@ -25,6 +25,6 @@ def notes_from_book(sender, **kwargs):
     if sender.has_html_file:
         for anchor, text_str, html_str in html.extract_annotations(sender.html_file.path):
             Note.objects.create(book=sender, anchor=anchor,
     if sender.has_html_file:
         for anchor, text_str, html_str in html.extract_annotations(sender.html_file.path):
             Note.objects.create(book=sender, anchor=anchor,
-                               html=html_str, sort_key=sortify(text_str))
+                               html=html_str, sort_key=sortify(text_str)[:128])
 
 Book.html_built.connect(notes_from_book)
 
 Book.html_built.connect(notes_from_book)