title: Django Admin: Dynamic Auto-Fill a Form Field from Selected Foreign Key's Attributes
body: <p>I've got two simple models that are relevant to the question:</p>
  
  <pre><code>class CarMake(models.Model):
      make = models.CharField(max_length=64)
      default_cost = models.DecimalField(max_digits=7, decimal_places=2)
  
  class Car(models.Model):
      model = models.CharField(max_length=64)
      make = models.ForeignKey(CarMake)
      cost = models.DecimalField(max_digits=7, decimal_places=2)
  </code></pre>
  
  <p>When creating or updating a <code>Car</code> object in the Django Admin, I'd like the <code>cost</code> field to be auto-populated with the <code>default_cost</code> of the chosen <code>CarMake</code> that is selected from the drop-down.</p>
  
  <p>Currently, I am storing the <code>cost</code> as the make's <code>default_cost</code> if the field is left blank on saving the object. I'd prefer to do this dynamically when the <code>make</code> drop down chooses a value. I assume that the solution would involve some amount of JavaScript...</p>