-
Unglued?
-
{{campaigns.0.deadline.date}}
-
Raised: $12,000
+
Unglued?
+
{{campaign.deadline.date}}
+
Raised:${{campaign.current_total}}
More Info
diff --git a/api/views.py b/api/views.py
index 5c5a6161..2eb3b94f 100755
--- a/api/views.py
+++ b/api/views.py
@@ -64,8 +64,17 @@ def widget(request,isbn):
else:
logged_in_username = None
+ # for now pass in first campaign -- but should loop through to prioritize any active campaigns
+ if len(campaigns):
+ campaign = campaigns[0]
+ progress = int(100*campaign.current_total/campaign.target)
+ else:
+ campaign = None
+ progress = None
+
return render_to_response('widget.html',
- {'isbn':isbn,'edition':edition, 'work':work, 'campaigns':campaigns, 'logged_in_username':logged_in_username},
+ {'isbn':isbn,'edition':edition, 'work':work, 'campaign':campaign, 'progress': progress,
+ 'logged_in_username':logged_in_username},
context_instance=RequestContext(request)
)
diff --git a/settings/dev.py b/settings/dev.py
index e370b822..710344c3 100644
--- a/settings/dev.py
+++ b/settings/dev.py
@@ -72,10 +72,10 @@ PAYPAL_SANDBOX_PASSWORD = ''
PAYPAL_BUYER_LOGIN =''
PAYPAL_BUYER_PASSWORD = ''
-PAYPAL_GLUEJAR_EMAIL = ""
+PAYPAL_GLUEJAR_EMAIL = "glueja_1317336101_biz@gluejar.com"
# for test purposes have a single RH paypal email
PAYPAL_TEST_RH_EMAIL = "rh1_1317336251_biz@gluejar.com"
-PAYPAL_TEST_NONPROFIT_PARTNER_EMAIL = ""
+PAYPAL_TEST_NONPROFIT_PARTNER_EMAIL = "nppart_1318957063_per@gluejar.com"
BASE_URL = 'http://0.0.0.0/'