add location field to bookmarks
[wolnelektury.git] / src / bookmarks / models.py
index 67a4fa5..88b3e85 100644 (file)
@@ -12,6 +12,9 @@ class Bookmark(models.Model):
 
     def __str__(self):
         return str(self.uuid)
 
     def __str__(self):
         return str(self.uuid)
+
+    def location(self):
+        return f'{self.book.slug}/{self.anchor}'
     
     def get_for_json(self):
         return {
     
     def get_for_json(self):
         return {