Shpaml -> (shpaml preprocessor) -> Django -> (Django dynamic rendering) ->
HTML
I'm not the world's biggest fan of Django's templating language, but it
certainly gets the job done for simple problems.
I would look into Jinja, which I've heard good things about, but I don't have
first hand experience with it.