title: Why does Django admin list_select_related not work in this case?
body: <p>I've got a <code>ModelAdmin</code> class that includes a foreign key field in its <code>list_display</code>. But the admin list page for that model is doing hundreds of queries, one query per row to get the data from the other table instead of a join (<code>select_related()</code>).</p>
  
  <p>The Django docs <a href="https://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.list_select_related" rel="nofollow noreferrer">indicate</a> you can add <code>list_select_related = True</code> as an attribute to your ModelAdmin to make this go away, but it doesn't seem to work at all for me. <a href="https://stackoverflow.com/questions/9719662/django-admin-performance-issue">This SO question</a> seems to give a similar problem, but his resolution is unclear, and it doesn't work in my case.</p>
  
  <p>Here's a cut-down version of my model and model admin:</p>
  
  <pre><code>class Device(models.Model):
      serial_number = models.CharField(max_length=80, blank=True, unique=True)
      label = models.CharField(max_length=80, blank=True)
  
      def __str__(self):
          s = str(self.serial_number)
          if self.label:
              s += ': {0}'.format(self.label)
          return s
  
  class Event(models.Model):
      device = models.ForeignKey(Device, null=True)
      type = models.CharField(max_length=40, null=False, blank=True, default='')
  
  class EventAdmin(admin.ModelAdmin):
      list_display = ('__str__', 'device')
      list_select_related = True
  </code></pre>
  
  <p>However, adding that <code>list_selected_related = True</code> didn't change anything. I still get lots of queries like this instead of an SQL join:</p>
  
  <p><img src="https://i.stack.imgur.com/B8IDi.png" alt="Lots of queries, not a join"></p>
  
  <p>Any ideas why the Django admin seems to be ignoring my list_select_related and doing N queries? I'm using Python 2.7 and Django 1.3.3.</p>