title: Handling Enums with DotLiquid templating engine
body: <p>I'm currently working on a Web project for which I need to be able to send an email. I started using DotLiquid for the templating engine, but I found certain issues with it, the biggest being that it does not seem to be able to handle enums.</p>
  
  <p>I tried to register the type as "Safe" like that <code>Template.RegisterSafeType(typeof(Gender), new string[] { "Male", "Female" });</code>, but it does not seem to work. At best, there is no longer any exception thrown, but the expected result is empty.</p>
  
  <pre><code>&lt;ul&gt;
      {% for f in Model.Friends %}
          {% if f.Gender == Male %}
              &lt;li&gt;
                  {{ f.FirstName }} {{ f.LastName }} {{ f.Gender }}
              &lt;/li&gt;
          {% endif %}
      {% endfor %}
  &lt;/ul&gt;
  
  &lt;ul&gt;
      {% for f in Model.Friends %}
          {% if f.Gender == Gender.Male %}
              &lt;li&gt;
                  {{ f.FirstName }} {{ f.LastName }} {{ f.Gender }}
              &lt;/li&gt;
          {% endif %}
      {% endfor %}
  &lt;/ul&gt;
  
  &lt;ul&gt;
      {% for f in Model.Friends %}
          {% if f.Gender == 0 %}
              &lt;li&gt;
                  {{ f.FirstName }} {{ f.LastName }} {{ f.Gender }}
              &lt;/li&gt;
          {% endif %}
      {% endfor %}
  &lt;/ul&gt;
  </code></pre>
  
  <p>None of the above were able to return anything. I would be happy with a string or int representation of the enum, but there is nothing for now. Has anyone found a solution to this issue ?</p>
  
  <p>I would like to avoid to "transform" the enum myself in the Drop object as this could be confusing later on.</p>
  
  <p>Thank you.</p>