fix ebook url in reverse method

pull/1/head
eric 2013-04-26 17:49:57 -04:00
parent c5517df1c9
commit 6b7fb7fd00
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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