Re: hello & question (sorting related cmodels)

2006-06-13 Thread DavidA
Bram, You can add this to your model: class Meta: ordering = ('name',) Here is the documentation: http://www.djangoproject.com/documentation/models/ordering/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gr

hello & question (sorting related cmodels)

2006-06-13 Thread Bram de Jong - MTG
Hello everyone, A (long) question: I have two models, linked by a single key. LinkClass ("search engines", ...) and Link ("http://www.google.com";, "http://www.yahoo.com";) Now, in Python I can do: for link_class in LinkClass.objects.all(): print link_class.name for link in link_c