title: Using Python dictionaries/objects in Velocity/Airspeed
body: <p>I'm using the airspeed package to work with Velocity templates (script for existing Java/Velocity project, hence choice of engine). I have modeled the data as dictionaries of custom objects and now I'm trying to figure out how to iterate over them in the Velocity template.</p>
  
  <p>Python code:</p>
  
  <pre><code>class Walkthrough:
      def __init__(self, title):
          self.title = title
          self.pages = {}
      def add_page(self, page):
          self.pages[page.number] = page
  
  class Page:
      def __init__(self, title):
          self.title = title
  
  walks = {}
  walks['obj_1'] = Walkthrough('Object 1')
  walks['obj_2'] = Walkthrough('Object 2')
  loader = airspeed.CachingFileLoader("./velocity")
  text_template = loader.load_template("text_only.vm")
  map = { 'walkthroughs': walks }
  text_template.merge(map, loader=loader)
  </code></pre>
  
  <p>Velocity template:</p>
  
  <pre><code>&lt;html&gt;
      ...
      #foreach($walk in $walkthroughs)
          &lt;h3&gt;$walk.title&lt;/h3&gt;
      #end
      ...
  &lt;/html&gt;
  </code></pre>
  
  <p>I only get 'obj_1' and 'obj_2', not the associated objects. Does anyone know what I'm doing wrong?</p>