title: Load django template from the database
body: <p>Im trying to render a django template from a database outside of djangos normal request-response structure. But it appears to be non-trivial due to the way django templates are compiled. I want to do something like this:</p>
  
  <pre><code>&gt;&gt;&gt; s = Template.objects.get(pk = 123).content
  &gt;&gt;&gt; some_method_to_render(s, {'a' : 123, 'b' : 456})
  &gt;&gt;&gt; ... the rendered output here ...
  </code></pre>
  
  <p>How do you do this?</p>