title: Get the integer part of a Decimal field in a Django template
body: <p>My question is very simple, but I couldn't find an answer. I'm sorry if it has been answered before.</p>
  
  <p>I have a DecimalField which came from a view to my template in my django application.
  I need to display only the integer part of it.</p>
  
  <p>How can I do that?</p>
  
  <p>========================= SOLUTION FOUND ========================</p>
  
  <p>Sorry, I would have answered if I had permission, but only after 8 hours I can do so.</p>
  
  <p>Thank you for the answers. I have found a builtin solution that worked just fine.
  It is a builtin template filter. The documentation follows.</p>
  
  <p><a href="https://docs.djangoproject.com/en/dev/ref/templates/builtins/?from=olddocs#floatformat" rel="noreferrer">https://docs.djangoproject.com/en/dev/ref/templates/builtins/?from=olddocs#floatformat</a></p>
  
  <p>Basically, the usage for my purpose is something like this:</p>
  
  <pre><code>{{decimal_obj|floatformat:0}}
  </code></pre>
  
  <p>An even better solution is the stringformat filter:</p>
  
  <p><a href="https://docs.djangoproject.com/en/dev/ref/templates/builtins/?from=olddocs#stringformat" rel="noreferrer">https://docs.djangoproject.com/en/dev/ref/templates/builtins/?from=olddocs#stringformat</a></p>
  
  <p>Usage:</p>
  
  <pre><code>{{decimal_obj|stringformat:"d"}}
  </code></pre>
  
  <p>Thanks for the help. Ignacio was right ;)</p>