(if we want to generalise this it would be useful to go for a custom field such as https://djangosnippets.org/snippets/1262/)