From: Marek Stępniowski Date: Tue, 16 Sep 2008 19:33:35 +0000 (+0200) Subject: Fixed links for showing fragments in book text. X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/e3f24620b9a69f1eb0652a9ffec2c2c3d6a10b8e Fixed links for showing fragments in book text. --- diff --git a/apps/catalogue/models.py b/apps/catalogue/models.py index 2a9387300..7f6268fdb 100644 --- a/apps/catalogue/models.py +++ b/apps/catalogue/models.py @@ -248,7 +248,7 @@ class Fragment(models.Model): return mark_safe(self._short_html) def get_absolute_url(self): - return '%s#m%s' % (self.book.html_file.url, self.anchor) + return '%s#m%s' % (reverse('book_text', kwargs={'slug': self.book.slug}), self.anchor) class Meta: ordering = ('book', 'anchor',)