From 66ebeaf07ebc3fee05087228bd2e039ad93273fa Mon Sep 17 00:00:00 2001 From: Andromeda Yelton Date: Fri, 9 Dec 2011 16:15:11 -0500 Subject: [PATCH] links to edition-specific google books in detail view --- frontend/templates/work.html | 2 +- frontend/views.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/templates/work.html b/frontend/templates/work.html index fb15b57d..4ab59b78 100644 --- a/frontend/templates/work.html +++ b/frontend/templates/work.html @@ -166,7 +166,7 @@ jQuery(document).ready(function(){

Editions

{% for edition in editions %} -
+
{% endfor %} {% if work.claim.count %} diff --git a/frontend/views.py b/frontend/views.py index 43eefa50..51148a09 100755 --- a/frontend/views.py +++ b/frontend/views.py @@ -6,6 +6,7 @@ import logging import datetime from decimal import Decimal as D from re import sub +from random import randint from django import forms from django.db.models import Q, Count, Sum @@ -77,6 +78,8 @@ def work(request, work_id, action='display'): work = get_object_or_404(models.Work, id=work_id) editions = work.editions.all() campaign = work.last_campaign() + server = randint(0,9) + if not request.user.is_anonymous(): claimform = UserClaimForm( request.user, data={'work':work_id, 'user': request.user.id}) else: @@ -102,6 +105,7 @@ def work(request, work_id, action='display'): 'wishers': wishers, 'base_url': base_url, 'editions': editions, + 'server': server, }) def manage_campaign(request, id):