title: Choose queryset for limit_choices_to based on object fields
body: <p>I am trying to limit the choices of a foreign field to those other objects who look like the object self.</p>
  
  <p>I've tried this:</p>
  
  <pre><code>class Model1(models.Model):
      entry = models.ForeignKey(Model2, limit_choices_to='get_limit_choices_to')
      number = IntegerField()
  
      def get_limit_choices_to(self):
          return Model2.objects.filter(expenditure_type=self.expenditure_type)
  
  class Model2(models.Model):
      number = IntegerField()
  </code></pre>
  
  <p>but I get the error</p>
  
  <pre><code>_filter_or_exclude() argument after ** must be a mapping, not str
  </code></pre>
  
  <p>I don't know if limit_choices_to is the right way to do this. Maybe I should choose the queryset in a or the views.</p>
  
  <p>The error says that <code>limit_choices_to='get_limit_choices_to'</code> is a wrong way to refer to the method, but how can I refer to the method correctly? I can't use</p>
  
  <pre><code>limit_choices_to=lambda: {'model1_set': self}
  </code></pre>
  
  <p>nor</p>
  
  <pre><code>limit_choices_to=lambda: {'number': number}
  </code></pre>
  
  <p>I am using Django 1.7.</p>