Navigation Menu

Skip to content
This repository has been archived by the owner on Feb 1, 2020. It is now read-only.

Commit

Permalink
Adding in events to the bill view
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Tagliamonte committed Sep 14, 2012
1 parent 130cb2e commit 6ee44c9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions billy/web/public/views/bills.py
Expand Up @@ -267,6 +267,11 @@ def bill(request, abbr, session, bill_id):
raise Http404('no bill found {0} {1} {2}'.format(abbr, session,
bill_id))

events = db.events.find({
"state": abbr,
"related_bills.bill_id": bill['_id']
}).sort("when", -1)

popularity.counter.inc('bills', bill['_id'], abbr=abbr, session=session)

show_all_sponsors = request.GET.get('show_all_sponsors')
Expand All @@ -279,6 +284,7 @@ def bill(request, abbr, session, bill_id):
abbr=abbr,
metadata=Metadata.get_object(abbr),
bill=bill,
events=events,
show_all_sponsors=show_all_sponsors,
sponsors=sponsors,
sources=bill['sources'],
Expand Down

0 comments on commit 6ee44c9

Please sign in to comment.