From ec7a3155b29783e566fa3e7bdc0c5a156d1da10e Mon Sep 17 00:00:00 2001 From: eric Date: Sat, 5 Oct 2013 11:41:12 -0400 Subject: [PATCH] exclude incomplete transactions from event display on landing page --- frontend/templates/home.html | 11 ++++++----- frontend/views.py | 2 ++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/frontend/templates/home.html b/frontend/templates/home.html index 24fe1c23..4e5efeb2 100755 --- a/frontend/templates/home.html +++ b/frontend/templates/home.html @@ -159,17 +159,18 @@ function put_un_in_cookie2(){ {% comment %} events are tuples of date, object, and string representing object type {% endcomment %} -
  • - {% with event.1 as object %} - {% ifequal event.2 "pledge" %} +
  • + {% with event.1 as object %} + {% ifequal event.2 "pledge" %} Avatar for {{ object.user.username }} {{ object.user.username }}
    - {% ifequal object.type 2 %} + {% ifequal object.campaign.type 1 %} pledged to unglue - {% else %} + {% endifequal %} + {% ifequal object.campaign.type 2 %} bought a copy of {% endifequal %}
    {{ object.campaign.work.title }} diff --git a/frontend/views.py b/frontend/views.py index 3841ed29..c3ac36a3 100755 --- a/frontend/views.py +++ b/frontend/views.py @@ -232,6 +232,8 @@ def home(request, landing=False): )[:10] latest_pledges = Transaction.objects.filter( anonymous=False + ).exclude( + type=0 #incomplete ).only( 'date_created', 'user', 'campaign' ).order_by(