I have a strange problem in django admin list_display . Whenever I add a foreign key to list_display , the entire list of change lists becomes empty, showing only the total number of entries.
models.py:
class Organization(models.Model): org_id = models.AutoField(primary_key=True) org_name = models.CharField(max_length=288) def __unicode__(self): return self.org_name class Meta: db_table = u'organization' class Server(models.Model): server_id = models.AutoField(primary_key=True) server_name = models.CharField(max_length=135,verbose_name="Server Name") org = models.ForeignKey(Organization,verbose_name="Organization") def __unicode__(self): return self.server_name class Meta: db_table = u'server'
admin.py:
class ServerAdmin(admin.ModelAdmin): list_display = ('server_name','org') admin.site.register(Server,ServerAdmin)
Now I expect this code to show me the name of the organization in ChangeList View , but instead I get the following:

If I remove org in the list_display class of the list_display class, I get the following:

I did not modify the template or redefine any ModelAdmin methods. I use Mysql (5.1.58) as my database, which comes with the ubuntu 11.10 repository.
I will be very happy if I can get an answer to this problem. Thanks in advance.
Pannu source share