On Saturday 18 February 2006 03:12, bsnipes wrote:
> I finally see! What is returned by get_object() is dependent upon
> the results of the __repr__ method in the model setup. Hmmm..... now
> to get it into a parsable format...
No, get_object() gets the object itself, with .name and all the other
attributes. What you see at an interactive prompt, or what you see if
you just have the food object in a template like you described, depends
on repr(), which calls __repr__() on you object. So you detail
template needs to look like this:
--- snip
{{ fentry.name }}
--- end snip
(or whatever).
Luke
--
"My capacity for happiness you could fit into a matchbox without taking
out the matches first." (Marvin the paranoid android)
Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---