title: How to change django datetime format output?
body: <p>I have a datetime object. This is my template file:</p>
  
  <pre><code>&lt;ul&gt;
  &lt;li&gt;{{ sale.validity }}&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>and the output i'm getting is in the format:</p>
  
  <blockquote>
    <p>July 18, 2012, midnight</p>
  </blockquote>
  
  <p>I would really like to change the output to be numerical in the format: day-month-year so for example the above would be changed to:</p>
  
  <blockquote>
    <p>18-07-2012</p>
  </blockquote>
  
  <p>Can someone point me out to the right direction on this?</p>