Let Django handle much of the templating

May incidentally resolve #11.