I've got two classes defined. Here's the first:

class School(meta.Model):
   long_name = meta.CharField("Official Name", maxlength=100)
   nickname  = meta.CharField("Mascot", maxlength=50)
   class META:
      ordering = ('long_name',)
      admin = meta.Admin(
         search_fields = ['long_name', 'nickname'],
         list_display = ('long_name', 'nickname',),
      )
    def __repr__(self):
       return self.long_name

class SeasonInfo(meta.Model);
   season = meta.ForeignKey(Season)
   school = meta.ForeignKey(School)
   (more stuff)
   class META:
      ordering = ('season','school',)


My question is how do I get the SeasonInfo to order by season and
long_name from the School class rather than the id of the school?

Reply via email to