title: DRF: Programmatically get default choice from TextChoices field
body: <p>Our site is a Vue frontend / DRF backend. In a <code>serializer.validate()</code> method, I need to programmatically determine which option from a <code>TextChoices</code> class has been specified as the default value for a model field.</p>
  <p>TextChoices class (abbreviated example):</p>
  <pre><code>class PaymentMethod(models.TextChoices):
      BANK_TRANSFER = 'Bank Transfer'
      CREDIT_CARD = 'Credit Card'
      PAYPAL = 'PayPal'
      OTHER = 'Other'
  </code></pre>
  <p>The model:</p>
  <pre><code>class InvoicePayment(CommonFieldsModelMixin,
                       StatusFieldModelMixin,
                       models.Model):
  
      ...other fields omitted...
      payment_method = models.TextField(
          verbose_name=_('Method'),
          choices=PaymentMethod.choices,
          default=PaymentMethod.OTHER,
      )
      payment_method_other = models.TextField(
          verbose_name=_('Payment Method Other'),
          default='',
      )
  </code></pre>
  <p>Our users are able to bypass the frontend and post directly to the API, which means they may omit fields from the POST data - either from negligence or because the fields have default values.  For the above model, though, <code>payment_method_other</code> is required only if <code>payment_method</code> is &quot;Other&quot;. That check is done in the <code>serializer.validate()</code> method.</p>
  <p>If &quot;Other&quot; is selected on a form in the frontend, there's no problem because that value is present in <code>validated_data</code> passed to the <code>validate()</code> method. But if a user posts directly to the API and omits <code>payment_method</code>, the default value process is done at the database level (more or less), after the <code>validate()</code> method has executed.</p>
  <p>To keep it DRY, and to avoid having mismatched code if the default is changed in the future, I don't want to hard-code the default of &quot;Other&quot; in the <code>validate()</code> method.  Instead, I want to access the field definition info (meta data?) and programmatically determine the default that was defined on the model.</p>