@ensure_csrf_cookie<EOL>def bill(request, abbr, session, bill_id):
<EOL>fixed_bill_id = fix_bill_id(bill_id)<EOL>if fixed_bill_id.replace('<STR_LIT:U+0020>', '<STR_LIT>') != bill_id:<EOL><INDENT>return redirect('<STR_LIT>', abbr=abbr, session=session, bill_id=fixed_bill_id.replace('<STR_LIT:U+0020>', '<STR_LIT>'))<EOL><DEDENT>bill = db.bills.find_one({settings.LEVEL_FIELD: abbr, '<STR_LIT>': session,<EOL>'<STR_LIT>': fixed_bill_id})<EOL>if bill is None:<EOL><INDENT>raise Http404(u'<STR_LIT>'.format(abbr, session, bill_id))<EOL><DEDENT>show_all_sponsors = request.GET.get('<STR_LIT>')<EOL>if show_all_sponsors:<EOL><INDENT>sponsors = bill.sponsors_manager<EOL><DEDENT>else:<EOL><INDENT>sponsors = bill.sponsors_manager.first_fifteen<EOL><DEDENT>return render(<EOL>request, templatename('<STR_LIT>'),<EOL>dict(vote_preview_row_template=templatename('<STR_LIT>'),<EOL>abbr=abbr,<EOL>metadata=Metadata.get_object(abbr),<EOL>bill=bill,<EOL>show_all_sponsors=show_all_sponsors,<EOL>sponsors=sponsors,<EOL>sources=bill['<STR_LIT>'],<EOL>nav_active='<STR_LIT>'))<EOL>
Context:
    - vote_preview_row_template
    - abbr
    - metadata
    - bill
    - show_all_sponsors
    - sponsors
    - sources
    - nav_active

Templates:
    - billy/web/public/bill.html
    - billy/web/public/vote_preview_row.html