From 2bcf645461a9bd6b126f78fd351b857773f2457b Mon Sep 17 00:00:00 2001 From: Evert Date: Thu, 28 Dec 2017 17:24:27 +0200 Subject: [PATCH] Make season description optional --- LandingPage/models.py | 3 ++- Show/templates/episode.html | 6 +++++- Show/templates/episode_add.html | 19 ++++++++++++++++--- Show/templates/submit.html | 6 +++++- Show/templates/submit_mod.html | 6 +++++- 5 files changed, 33 insertions(+), 7 deletions(-) diff --git a/LandingPage/models.py b/LandingPage/models.py index e84d98e..8a434a4 100644 --- a/LandingPage/models.py +++ b/LandingPage/models.py @@ -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, diff --git a/Show/templates/episode.html b/Show/templates/episode.html index 92eed67..431fdcf 100644 --- a/Show/templates/episode.html +++ b/Show/templates/episode.html @@ -34,7 +34,11 @@

Season {{ episode.season.number }}

{% endif %}

- {{ episode.season.description }} + {% if episode.season.description %} + {{ episode.season.description }} + {% else %} + {{ show.description }} + {% endif %}

diff --git a/Show/templates/episode_add.html b/Show/templates/episode_add.html index 786c5f1..2c4eed7 100644 --- a/Show/templates/episode_add.html +++ b/Show/templates/episode_add.html @@ -7,12 +7,25 @@ diff --git a/Show/templates/submit_mod.html b/Show/templates/submit_mod.html index 5d83de9..d3ffc83 100644 --- a/Show/templates/submit_mod.html +++ b/Show/templates/submit_mod.html @@ -21,7 +21,11 @@

Season {{ episode.season.number }}

{% endif %}

- {{ episode.season.description }} + {% if episode.season.description %} + {{ episode.season.description }} + {% else %} + {{ show.description }} + {% endif %}