fix ebook url in reverse method
parent
c5517df1c9
commit
6b7fb7fd00
|
@ -1063,7 +1063,7 @@ class Ebook(models.Model):
|
|||
|
||||
@property
|
||||
def download_url(self):
|
||||
return settings.BASE_URL_SECURE + reverse('ebook',args=[self.id])
|
||||
return settings.BASE_URL_SECURE + reverse('download_ebook',args=[self.id])
|
||||
|
||||
def __unicode__(self):
|
||||
return "%s (%s from %s)" % (self.edition.title, self.format, self.provider)
|
||||
|
|
|
@ -2333,7 +2333,7 @@ def download(request, work_id):
|
|||
other_ebooks = work.ebooks().filter(edition__unglued=False)
|
||||
try:
|
||||
readmill_epub_ebook = work.ebooks().filter(format='epub').exclude(provider='Google Books')[0]
|
||||
readmill_epub_url = settings.BASE_URL_SECURE + reverse('ebook',args=[readmill_epub_ebook.id])
|
||||
readmill_epub_url = settings.BASE_URL_SECURE + reverse('download_ebook',args=[readmill_epub_ebook.id])
|
||||
except:
|
||||
readmill_epub_url = None
|
||||
|
||||
|
|
Loading…
Reference in New Issue