The `format_datetime_relative` filter is only used by the scheduling
stuff, which only deals with dates in the future.
When used on dates in the past (more than 1 day ago) it gets confused
and defaults to ‘tomorrow’.
The `format_delta` method does a similar thing, but works for past and
future dates.
Users can still click through to the next page to see the exact date and
time of the edits.
Address line 3 is optional. Currently the only way we have of indicating
to users what is/isn’t optional is by using the example. Which probably
isn’t ideal, but should at least be correct.
The breaking change page wasn’t properly accounting for the fact that
letter recipients span multiple columns – it was assuming they’d only
take up one column like they do for email and SMS.
This commit fixes:
- the number of column headers (A, B, C, …) to be correct
- the count of columns (you will need X columns in your file) to be
correct
It then parameterises the test to look at a case where a recipient is
in one column (email) and multiple columns (letter).
Our deploys have stopped working. It’s complaining with an `ImportError`
somewhere in Boto:
```
017-04-04T10:46:26.17+0100 [APP/PROC/WEB/0]ERR Traceback (most recent call last):
2017-04-04T10:46:26.17+0100 [APP/PROC/WEB/0]ERR File “/home/vcap/app/.heroku/python/bin/aws”, line 19, in <module>
2017-04-04T10:46:26.17+0100 [APP/PROC/WEB/0]ERR import awscli.clidriver
2017-04-04T10:46:26.17+0100 [APP/PROC/WEB/0]ERR File “/app/.heroku/python/lib/python3.5/site-packages/awscli/clidriver.py”, line 33, in <module>
2017-04-04T10:46:26.17+0100 [APP/PROC/WEB/0]ERR from awscli.help import ProviderHelpCommand
2017-04-04T10:46:26.17+0100 [APP/PROC/WEB/0]ERR File “/app/.heroku/python/lib/python3.5/site-packages/awscli/help.py”, line 27, in <module>
2017-04-04T10:46:26.17+0100 [APP/PROC/WEB/0]ERR from awscli.clidocs import ProviderDocumentEventHandler
2017-04-04T10:46:26.17+0100 [APP/PROC/WEB/0]ERR File “/app/.heroku/python/lib/python3.5/site-packages/awscli/clidocs.py”, line 18, in <module>
2017-04-04T10:46:26.17+0100 [APP/PROC/WEB/0]ERR from botocore.utils import is_json_value_header
2017-04-04T10:46:26.17+0100 [APP/PROC/WEB/0]ERR ImportError: cannot import name ‘is_json_value_header’
2017-04-04T10:46:26.20+0100 [APP/PROC/WEB/0]OUT Terminating application process with pid
```
Our version of Boto is a year old. Upgrading it to the latest version
seems like a good idea.
Not a breaking version number change. Changelog here:
https://github.com/boto/boto3/blob/develop/CHANGELOG.rst
Complete changes:
https://github.com/boto/boto3/compare/1.3.0...1.4.4
Brings in:
- [ ] https://github.com/alphagov/notifications-utils/pull/128
This means that `RecipientCSV` will sometimes return the value of a cell
in a spreadsheet as a `list`, not a `string`. So we need to handle that,
rather than putting a Python representation (`['one', 'two', 'three']`)
on the page.
This commit handles it by putting a bulleted list on the page instead.
This breaks our model of showing the spreadsheet as it appears in Excel
or whatever, because we’re showing the aggregation of the columns into a
list. However:
- this is the easier thing to do for now
- it might actually be more usable because it keeps the table narrower
No need to repeat the same field-calling code each time.
Think we didn’t do this before because there was no way of passing the
`status` through to the `text_field` macro.
We set a URL for the app to use to access itself. On PaaS this is
configurable, locally we default to `localhost`. `localhost` doesn’t
(easily?) support HTTPS, so this default wasn’t working.
Users who go to edit the contact details for a letter from the template
page get very confused when they click save and are dumped on the
settings page. It doesn’t match the way editing other parts of
letter works, and you can’t see an accurate preview of the changes from
the settings page.
So this commit changes the flow to go from the _edit contact details_
page back to the _view template_ page when the user has got there by
clicking the blue _Edit_ button on the _view template_ page.
This page is not the place where you edit the contact details. Nor is
it the place where you can preview changes to the contact block. In
research users never found the link to get from this page to the edit
contact details page. So this commit removes it.
pass in the base URL - if not set in the environment this is set to
localhost, but on paas we can pull this out of vcap_services so that
letters render properly on paas
When you’ve sent message(s) using a template, often the next thing you
want to do is go and send the same template again, or edit it.
Currently there’s no way of getting to a template from a job except for
going back to the list of templates and re-finding it.
This commit adds a link at the bottom of the job page that gives you a
shortcut back to the individual template, where you can find actions
like edit/send/etc.