title: Using integers and strings together in Django choice field
body: <p>I am trying to use the new Enum types in the latest Django version for the choice field. Specifically I am trying to store the various states of United States as follows:</p>
  <pre><code>class States(models.TextChoices):
      ALABAMA = 'AL', 'Alabama'
      ALASKA = 'AK', 'Alaska'
      .....
      .....
      WISCONSIN = 'WI', 'Wisconsin'
      WYOMING = 'WY', 'Wyoming'
  
  
  class PersonalInfo(models.Model):
      state = models.CharField(max_length=2, choices=States.choices, default=States.ALABAMA)
  </code></pre>
  <p>Works as expected.
  Now, I am also trying to make the max_length variable also a class attribute of the choice class to make the code more modular by doing the following:</p>
  <pre><code>class States(models.TextChoices):
      ALABAMA = 'AL', 'Alabama'
      ALASKA = 'AK', 'Alaska'
      .....
      .....
      WISCONSIN = 'WI', 'Wisconsin'
      WYOMING = 'WY', 'Wyoming'
      MAX_LENGTH = 2
      
  
  class PersonalInfo(models.Model):
      state = models.CharField(max_length=States.MAX_LENGTH, choices=States.choices, default=States.ALABAMA)
  </code></pre>
  <p>This gives me an error as follows:</p>
  <blockquote>
  <p>if self.max_length is not None and choice_max_length &gt; self.max_length:<br />
  TypeError: '&gt;' not supported between instances of 'int' and 'States'</p>
  </blockquote>
  <p>I understand that Django also provides an alternative IntegerChoices for integer but how do I use both text and integer choices together.</p>