Fix count of columns on breaking change page

For some reason we were rebuilding `new_template` as a dictionary,
without the `placeholders` attribute. This meant that we were never
actually counting the placeholders, just counting the length of `None`
and adding 1 to it.

So this commit fixes that, beefs up the tests, and makes sure that
everything is pluralised properly.
This commit is contained in:
Chris Hill-Scott
2017-03-06 13:08:27 +00:00
parent 536d091d85
commit 5081d83c19
3 changed files with 13 additions and 9 deletions

View File

@@ -41,7 +41,8 @@
<p>
When you send messages using this template youll need
{{ new_template.placeholders|length + 1 }} columns of data:
{{ new_template.placeholders|length + 1 }}
column{{ 's' if new_template.placeholders|length > 0 else '' }} of data:
</p>
<div class="spreadsheet">