https://djangosnippets.org/snippets/2132/
Anonymous
Code that is graceful and clear is less likely to break.