title: Get the value of an IntegerChoices field in Django?
body: <p>Suppose I have the following Django (3.2) code:</p>
  <pre><code>class AType(models.IntegerChoices):
      ZERO = 0, 'Zero'
      ONE = 1, 'One'
      TWO = 2, 'Two'
  
  class A(models.Model):
      a_type = models.IntegerField(choices=AType.choices)
  </code></pre>
  <p>Also, that I have a Django template with a variable <code>a</code>:</p>
  <pre><code>{{a.a_type}} is a number.
  </code></pre>
  <p>How do I get &quot;Zero&quot; (the string associated with a_type)?</p>