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

View File

@ -2550,7 +2550,7 @@ def download(request, work_id):
acq=None
formats = {} # a dict of format name and url
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():
all_acqs=request.user.acqs.filter(work=work).order_by('-created')