title: Django render template variable
body: <p>I have a field called "GOALS" that is rendered as a template variable and stored in a django model. That field is input via the admin interface and contains raw html, so in the django template there is</p>
  
  <pre><code>&lt;html&gt;
  ...
  &lt;P&gt;{{ GOALS|safe }}&lt;/P}
  ...
  &lt;/html&gt;
  </code></pre>
  
  <p>Now I want to render this variable before it gets placed into context with my own template tag. This will allow staff to enter tags that will query the database rather than hard code variables such as the title of a project that is identified by a slug etc.</p>
  
  <p>I thought of allowing them to enter template tags such as</p>
  
  <pre><code>GOALS = "... {{ "slug"|gettitle }} ..."
  </code></pre>
  
  <p>and rendering GOALS before it entered the context with</p>
  
  <pre><code>from django.template import Template, Context
  html2render = "{% load episode_tags %}" + GOALS
  miniTemplate = Template(html2render)
  context = Context({})
  GOALS = miniTemplate.render(context)
  </code></pre>
  
  <p>but loading my template tags did not work using Template this way, and this crashed with TemplateSyntaxError. So I figured I could use ElementTree and XML, but before I go ahead and do that (which is a little tedious) I wanted to ask the wider community if there was some better way to do this.</p>