pull/1/head
eric 2013-09-06 00:14:06 -04:00
parent aad6d72207
commit 6294c15aad
2 changed files with 2 additions and 2 deletions

View File

@ -767,7 +767,7 @@ class DownloadPageTest(TestCase):
anon_client = Client() anon_client = Client()
response = anon_client.get("/work/%s/download/" % w.id, follow=True) response = anon_client.get("/work/%s/download/" % w.id, follow=True)
self.assertContains(response, "/download_ebook/%s/"% eb1.id, count=9) self.assertContains(response, "/download_ebook/%s/"% eb1.id, count=10)
self.assertContains(response, "/download_ebook/%s/"% eb2.id, count=4) self.assertContains(response, "/download_ebook/%s/"% eb2.id, count=4)

View File

@ -2550,7 +2550,7 @@ def download(request, work_id):
acq=None acq=None
formats = {} # a dict of format name and url formats = {} # a dict of format name and url
for ebook in work.ebooks().all(): for ebook in work.ebooks().all():
formats[ebook.format] = reverse('download_ebook', ebook.id ) formats[ebook.format] = reverse('download_ebook', args=[ebook.id] )
if request.user.is_authenticated(): if request.user.is_authenticated():
all_acqs=request.user.acqs.filter(work=work).order_by('-created') all_acqs=request.user.acqs.filter(work=work).order_by('-created')