Hi Greg,
I think the documentation needs an update, but you need to make sure
that the query includes the column that you want to order by... in
Django terms the easiest way is to use the select_related method. So
you should find that your view query works if you modify it slightly
to:
Entry.obj
I'm running through some djagno API examples and I'm having a problem
with how to order by a field in a different table. Here is what my
models:
class Blog(models.Model):
name = models.CharField(maxlength=100)
tagline = models.TextField()
def __unicode__(self):
return self.n
2 matches
Mail list logo