title: Custom Dependent Dropdown menu inside the Django admin
body: <p>I have a project foreign key in by Phase model.  I'm having hard time Create a dependent drop-down list inside my Django admin page.</p>
  
  <p>I want to when user select a project from (project drop-down) phase of that project show in second dop-down</p>
  
  <p>What would be the best way to achieve this?</p>
  
  <p>It would be great if the dropdowns filter items based on the value of its parent.</p>
  
  <p><a href="https://i.stack.imgur.com/9dc0K.png" rel="noreferrer"><img src="https://i.stack.imgur.com/9dc0K.png" alt="enter image description here"></a></p>
  
  <pre><code>class Project(models.Model):
      name                    = models.CharFieldmax_length = 100, unique= True)
      short_name              = models.CharField(max_length= 4, unique= True)
      slug                    = models.SlugField(max_length= 100, allow_unicode=True, null=True, editable= False)
      location                = models.OneToOneField(Location, on_delete = models.SET_NULL, null= True, blank= False, verbose_name= 'موقعیت')
      start_date              = models.DateField(default= timezone.now, null= True, blank= True)      
      end_date                = models.DateField(default= timezone.now, null= True, blank= True)
      duration                = models.IntegerField(default= 0, editable= False)
  
  class Phase(models.Model):
      title                = models.CharField(max_length= 20)
  
  class ProjectPhase(models.Model):
      project                 = models.ForeignKey(Project, on_delete= models.CASCADE, related_name= 'phase')
      phase                   = models.ForeignKey(Phase, on_delete=models.CASCADE, related_name= 'project')
      start_date              = models.DateField(default= timezone.now)      
      end_date                = models.DateField(default= timezone.now)
      duration                = models.IntegerField(default= 0, editable= True)
  </code></pre>