{% extends "base.html" %}

{% block content %}

{% for bill_detail in latest_bills %}

    <div>

        <p><strong>{{ bill_detail.identifier }}</strong></p>
        <p>{{ bill_detail.title }}</p>
        <p>
            <span>Sponsor(s): </span>
            {% for sponsor in bill_detail.sponsors %}
                {{ sponsor }}
            {% endfor %}
        </p>

        <p>Latest action: {{ bill_detail.latest_action }}</p>

        <a href="../detail/{{ bill_detail.bill_id }}" class="btn btn-primary">More on this bill</a>

        <hr/>
    </div>

{% endfor %}

{% endblock %}


{% block bottomscript %}
    $(".prefs-multiple").select2();

{% endblock %}

{% extends "base.html" %}

{% block content %}

{% for bill in latest_bills %}

    <div>

        <p><strong>{{ bill.identifier }}</strong></p>
        <p>{{ bill.title }}</p>
        <p>
            <span>Sponsor(s): </span>
            {% for sponsor in bill.sponsorships.all %}
                {{ sponsor.name }}
            {% endfor %}
        </p>

        <p>Latest action: {{ bill.latest_action.description }} -  {{ bill.latest_action.date }}</p>

        <a href="{% url 'bill_detail' bill.legislative_session.identifier bill.identifier %}" class="btn btn-primary">More on this bill</a>

        <hr/>
    </div>

{% endfor %}

{% endblock %}


{% block bottomscript %}
    $(".prefs-multiple").select2();

{% endblock %}

Update latest actions template to use passed in querysets
Update latest actions template to use passed in querysets
