{% extends "base.html" %}
{% block content %}

<h1>{{ play.title }}</h1>
<p>Written by: <a href="/main/people/{{play.writer.id}}/">{{ play.writer }}</a></p>
<h2>Synopisis:</h2>
{{play.synopsis}}
<h2>All productions of {{play.title}}:</h2>

<ul>
{% for production in play.production_set.all %}
    <li><a href="/main/production/{{production.id}}/">Details</a> | <a href="/main/theater/{{production.theater.id}}/">{{ production.theater.name }}</a> ({{ production.theater.city }}) : {{production.production_company}} : {{ production.start_date }} - {{ production.end_date}}</li>
{% endfor %}
</ul>

{% endblock %}
{% extends "base.html" %}
{% block content %}

<h1>{{ play.title }}</h1>
<p>Written by:
    {% if play.writer %}
        <a href="/main/people/{{play.writer.id}}/">{{ play.writer }}</a></p>
    {% endif %}

<h2>Synopisis:</h2>
{{play.synopsis}}
<h2>All productions of {{play.title}}:</h2>

<ul>
{% for production in play.production_set.all %}
    <li><a href="/main/production/{{production.id}}/">Details</a> | <a href="/main/theater/{{production.theater.id}}/">{{ production.theater.name }}</a> ({{ production.theater.city }}) : {{production.production_company}} : {{ production.start_date }} - {{ production.end_date}}</li>
{% endfor %}
</ul>

{% endblock %}
Hide link to writer if the entry is null, so that it doesn't link to an invalid page.
Hide link to writer if the entry is null, so that it doesn't link to an invalid page.
