Thanks, although that reverses the logic, and only lets me select the
most recent for one table. The example is actually simplified, my User
object example actually has multiple items associated with it, for
example, I want to show a User, most recent Item, most recent
LogEntry, etc.
On Apr 7, 4:
Hm... something like that :
http://docs.djangoproject.com/en/dev/topics/db/queries/#backwards-related-objects
You can reverse a relationship, using "u.*att*_set".
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Djang
I have the following models:
class User(models.Model):
pass
class Item(Models.Mode):
created = models.DateTime(default=datetime.now)
user = models.ForeignKey(User, related_name="items")
class Meta:
ordering = ("-created",)
get_latest_by = "created"
So a user can
3 matches
Mail list logo