Don't know if this helps, but this is what I get from the shell:
>>> from django.models.foodlog import foods,periods
>>> foods.get_object(pk=1)
1
>>> foods.get_values(pk=1)
[{'eat_date': datetime.datetime(2006, 2, 10, 19, 51), 'period_id': 3,
'id': 1, 'calories': 400, 'description': 'mac and cheese tonight'}]
>>> a=foods.get_object(pk=1)
>>> periods.get_values(pk=a.period_id)
[{'id': 3, 'name': 'Supper'}]
>>> foods.get_object(pk=1, select_related=True)
1
>>> foods.get_values(pk=1, select_related=True)
[{'eat_date': datetime.datetime(2006, 2, 10, 19, 51), 'period_id': 3,
'id': 1, 'calories': 400, 'description': 'mac and cheese tonight'}]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---