From 7ecffddc9f478a74417665acb20902f799809720 Mon Sep 17 00:00:00 2001 From: eric Date: Tue, 17 Jan 2012 16:50:19 -0500 Subject: [PATCH] fix some isbn issues, incl. bad Openlibrary link --- frontend/templates/campaign_detail.html | 6 +++--- frontend/templates/work.html | 2 +- frontend/views.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/templates/campaign_detail.html b/frontend/templates/campaign_detail.html index 6c9e88a6..7ec71583 100644 --- a/frontend/templates/campaign_detail.html +++ b/frontend/templates/campaign_detail.html @@ -27,10 +27,10 @@

Target: {{campaign.target}}

Deadline: {{campaign.deadline}}

Status: {{campaign.status}}

-

ISBN: {{campaign.work.editions.all.0.isbn_10}} | {{campaign.work.editions.all.0.isbn_13}}

-

Widget Link

+

ISBN: {{campaign.work.editions.all.0.isbn_10}} | {{campaign.work.first_isbn_13}}

+

Widget Link

Embed a widget:

- +

PayPal receiver: {{campaign.paypal_receiver}}

Current total (pledged/authorized): {{campaign.current_total}}

diff --git a/frontend/templates/work.html b/frontend/templates/work.html index 0564ad3f..c3fd3b22 100644 --- a/frontend/templates/work.html +++ b/frontend/templates/work.html @@ -286,7 +286,7 @@ jQuery(document).ready(function(){ {% if request.user.is_authenticated %}{% endif %}
  • Embed
  • -
    Copy/paste this into your site:
    +
    Copy/paste this into your site:
    diff --git a/frontend/views.py b/frontend/views.py index 07c5311c..dcc63123 100755 --- a/frontend/views.py +++ b/frontend/views.py @@ -1161,7 +1161,7 @@ def work_librarything(request, work_id): def work_openlibrary(request, work_id): work = get_object_or_404(models.Work, id=work_id) - isbns = ["ISBN:" + e.isbn_13 for e in work.editions.filter(isbn_13__isnull=False)] + isbns = ["ISBN:" + i.value for i in work.identifiers.filter(type='isbn')] url = None if work.openlibrary_id: