We have defined the following models:

class AbstractEvent(models.Model):
        team = models.ForeignKey(Team)
        description = models.TextField(null=True, blank=True)
        description_rendered = models.TextField(null=True, blank=True)
        when = models.DateTimeField()
        where = models.ForeignKey(Address)
        created_at = models.DateTimeField(default=datetime.today)
        created_by = models.ForeignKey(User)
       ...
        class Meta:
                abstract = True

class Game(AbstractEvent):
        opponent = models.CharField(max_length=128)
        minutes_early = models.PositiveIntegerField(null=True, blank=True)
        counts_towards_record = models.BooleanField(default=True)
        points_for = models.IntegerField(null=True, blank=True)
        points_against = models.IntegerField(null=True, blank=True)
        ...

The AdminManager for the Game model is as follows:

class GameAdmin(admin.ModelAdmin):
        list_display = (team, 'opponent',)
        search_fields = (team, 'opponent',)

The problem is that including 'team' in the list_display causes the
admin to not list any games, but recognizes that there are games in
the table since it gives a total games count.  If I remove 'team," the
admin interface displays a list of games displaying "opponent."

Any help or suggestions are greatly appreciated!

Thanks,
Jim

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to