title: Foreign keys in django admin list display
body: <p>If a django model contains a foreign key field, and if that field is shown in list mode, then it shows up as <em>text</em>, instead of displaying a <em>link</em> to the foreign object.</p>
  
  <p>Is it possible to automatically display all foreign keys as links instead of flat text?</p>
  
  <p>(of course it is possible to do that on a field by field basis, but is there a general method?)</p>
  
  <p><strong>Example</strong>:</p>
  
  <pre><code>class Author(models.Model):
      ...
  
  class Post(models.Model):
      author = models.ForeignKey(Author)
  </code></pre>
  
  <p>Now I choose a ModelAdmin such that the author shows up in list mode:</p>
  
  <pre><code>class PostAdmin(admin.ModelAdmin):
      list_display = [..., 'author',...]
  </code></pre>
  
  <p>Now in list mode, the author field will just use the <code>__unicode__</code> method of the <code>Author</code> class to display the author. On the top of that I would like a <em>link</em> pointing to the url of the corresponding author in the admin site. Is that possible?</p>
  
  <p><strong>Manual method</strong>:</p>
  
  <p>For the sake of completeness, I add the manual method. It would be to add a method <code>author_link</code> in the <code>PostAdmin</code> class:</p>
  
  <pre><code>def author_link(self, item):
      return '&lt;a href="../some/path/%d"&gt;%s&lt;/a&gt;' % (item.id, unicode(item))
  author_link.allow_tags = True
  </code></pre>
  
  <p>That will work for that particular field but that is <strong>not</strong> what I want. I want a general method to achieve the same effect. (One of the problems is how to figure out automatically the path to an object in the django admin site.)</p>