{% extends 'base.html' %}

{% block content %}
    <div>Prospectus info goes here</div>
{% endblock %}
{% extends 'base.html' %}

{% block content %}
    {% if prospectus.campaign_set.count %}
    <div class="panel-group" id="accordion">
        {% for campaign in prospectus.campaign_set.all %}
        <div class="panel panel-default">
            <div class="panel-heading">
                <h4 class="panel-title">
                    <a data-toggle="collapse" data-parent="#accordion" href="#campaign{{ campaign.id }}">
                        <span>{{ campaign.short_name }}</span>
                        <span class="pull-right">{{ campaign.genre }}</span>
                    </a>
                </h4>
            </div>
            <div id="campaign{{ campaign.id }}" class="panel-collapse collapse in">
                <div class="panel-body">
                    <div>
                        {{ campaign.description }}
                    </div>
                </div>
            </div>
        </div>
        {% endfor %}
    </div>
    {% else %}
        <div>No campaigns are associated with this prospectus at the moment.</div>
        {% if request.user.is_authenticated %}
            {% if request.user == prospectus.owner %}
                <div><a href="{% url 'edit_prospectus' prospectus.id %}">Add some now.</a></div>
            {% elif request.user.is_staff and not prospectus.owner %}
                <div><a href="{% url 'edit_prospectus' prospectus.id %}">Add some now.</a></div>
            {% endif %}
        {% else %}
            <div><a href="{% url 'login' %}">Log into the owning account and add some now.</a></div>
        {% endif %}
    {% endif %}
{% endblock %}
Add instance data to prospectus view template
Add instance data to prospectus view template
