This is my model: class TestCaseSuite(models.Model): id = models.IntegerField(primary_key=True) hashid = models.CharField(max_length=390, blank=True) name = models.ForeignKey(Strings, db_column='name', related_name='tstcName') url = models.ForeignKey(Text, db_column='url', related_name='url') startsat = models.DateTimeField() duration = models.IntegerField() result = models.IntegerField() applicationname = models.ForeignKey(Strings, db_column='applicationname', related_name='applicationname', db_index=True, blank=True) hardwareversion = models.ForeignKey(Strings, db_column='hardwareversion', related_name='hardwareversion', db_index=True, blank=True) executionenvironment = models.ForeignKey(Strings, db_column='executionenvironment', related_name='executionenvironment', db_index=True, blank=True) releasetype = models.ForeignKey(Strings, db_column='releasetype', related_name='releasetype', db_index=True, blank=True) hostname = models.ForeignKey(Strings, db_column='hostname', related_name='hostname', db_index=True, blank=True) releasenumber = models.ForeignKey(Strings, db_column='releasenumber', related_name='releasenumber', db_index=True, blank=True) tsreference = models.IntegerField(null=True, blank=True) textid = models.ForeignKey(Text, null=True, db_column='textid', related_name='tstcTextid', db_index=True, blank=True)
class Strings(models.Model): id = models.IntegerField(primary_key=True) string = models.CharField(max_length=765, blank=True) How can I order by the related_name 'releasenumber' field 'string'? Stephane --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---