Commit 2bcf6454 authored by Evert Prants's avatar Evert Prants

Make season description optional

parent 971730f1
......@@ -225,7 +225,8 @@ class Season(models.Model):
help_text='The number of this season, starting at 1; For example, the first season to be aired would be number 1, and the second would be number 2'
)
description = models.TextField(
help_text='A description of this season\'s happenings'
help_text='A description of this season\'s happenings',
blank=True
)
artwork = models.ImageField(
storage=show_static_storage,
......
......@@ -34,7 +34,11 @@
<h3>Season {{ episode.season.number }}</h3>
{% endif %}
<p class="description">
{{ episode.season.description }}
{% if episode.season.description %}
{{ episode.season.description }}
{% else %}
{{ show.description }}
{% endif %}
</p>
</div>
</div>
......
......@@ -7,12 +7,25 @@
<div class="banner" style="background-image: url(/media/uploaded_resources/{{show.banner}});"></div>
<div class="banner-cover">
<div class="artwork">
<img src="/media/uploaded_resources/{{show.artwork}}">
{% if episode.season.artwork %}
<img src="/media/uploaded_resources/{{season.artwork}}">
{% else %}
<img src="/media/uploaded_resources/{{show.artwork}}">
{% endif %}
</div>
<div class="details">
<div class="details season">
<h1>{{show.name}}</h1>
{% if season.name %}
<h3>{{ season.name }}</h3>
{% else %}
<h3>Season {{ season.number }}</h3>
{% endif %}
<p class="description">
{{show.description}}
{% if season.description %}
{{ season.description }}
{% else %}
{{ show.description }}
{% endif %}
</p>
</div>
</div>
......
......@@ -21,7 +21,11 @@
<h3>Season {{ episode.season.number }}</h3>
{% endif %}
<p class="description">
{{ episode.season.description }}
{% if episode.season.description %}
{{ episode.season.description }}
{% else %}
{{ show.description }}
{% endif %}
</p>
</div>
</div>
......
......@@ -21,7 +21,11 @@
<h3>Season {{ episode.season.number }}</h3>
{% endif %}
<p class="description">
{{ episode.season.description }}
{% if episode.season.description %}
{{ episode.season.description }}
{% else %}
{{ show.description }}
{% endif %}
</p>
</div>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment