Generate the toolbar through Django templates rather than hard-coded HTML strings. Allows far greater customisation of the HTML. Includes unit tests.