Make season description optional
This commit is contained in:
parent
971730f1cb
commit
2bcf645461
@ -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'
|
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(
|
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(
|
artwork = models.ImageField(
|
||||||
storage=show_static_storage,
|
storage=show_static_storage,
|
||||||
|
@ -34,7 +34,11 @@
|
|||||||
<h3>Season {{ episode.season.number }}</h3>
|
<h3>Season {{ episode.season.number }}</h3>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<p class="description">
|
<p class="description">
|
||||||
{{ episode.season.description }}
|
{% if episode.season.description %}
|
||||||
|
{{ episode.season.description }}
|
||||||
|
{% else %}
|
||||||
|
{{ show.description }}
|
||||||
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -7,12 +7,25 @@
|
|||||||
<div class="banner" style="background-image: url(/media/uploaded_resources/{{show.banner}});"></div>
|
<div class="banner" style="background-image: url(/media/uploaded_resources/{{show.banner}});"></div>
|
||||||
<div class="banner-cover">
|
<div class="banner-cover">
|
||||||
<div class="artwork">
|
<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>
|
||||||
<div class="details">
|
<div class="details season">
|
||||||
<h1>{{show.name}}</h1>
|
<h1>{{show.name}}</h1>
|
||||||
|
{% if season.name %}
|
||||||
|
<h3>{{ season.name }}</h3>
|
||||||
|
{% else %}
|
||||||
|
<h3>Season {{ season.number }}</h3>
|
||||||
|
{% endif %}
|
||||||
<p class="description">
|
<p class="description">
|
||||||
{{show.description}}
|
{% if season.description %}
|
||||||
|
{{ season.description }}
|
||||||
|
{% else %}
|
||||||
|
{{ show.description }}
|
||||||
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -21,7 +21,11 @@
|
|||||||
<h3>Season {{ episode.season.number }}</h3>
|
<h3>Season {{ episode.season.number }}</h3>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<p class="description">
|
<p class="description">
|
||||||
{{ episode.season.description }}
|
{% if episode.season.description %}
|
||||||
|
{{ episode.season.description }}
|
||||||
|
{% else %}
|
||||||
|
{{ show.description }}
|
||||||
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -21,7 +21,11 @@
|
|||||||
<h3>Season {{ episode.season.number }}</h3>
|
<h3>Season {{ episode.season.number }}</h3>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<p class="description">
|
<p class="description">
|
||||||
{{ episode.season.description }}
|
{% if episode.season.description %}
|
||||||
|
{{ episode.season.description }}
|
||||||
|
{% else %}
|
||||||
|
{{ show.description }}
|
||||||
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user