2007/7/23, Jacob Kaplan-Moss <[EMAIL PROTECTED]>:
> It's probably just your shell; try ``print myobject`` instead.
Hi Jacob,
That's not exactly what I want to do. I use __str__ to get the title
of the object and __repr__ to have a representation of this one. To be
clear, I implement workflows and I'd like to have some kind of
hierarchy when I represent those objects. So instead of the usual
django representations:
>>> print myobject # call __str__
Title of my object
>>> myobject # call __repr__
<MyObject: Title of my object>
I'd like to have those informations:
>>> print myobject # call __str__
Title of my object
>>> myobject # call __repr__
<MyObject: Title of my object>
<MySubObject: Title... >
</MyObject: Title of my object>
Before I switched to the unicoded trunk, it works perfectly but know
unicoded string were escaped so I have:
>>> myobject # call __repr__
<MyObject: Title of my object>\n <MySubObject: Title...
>\n</MyObject: Title of my object>\n
That's why I want to "unescape" unicoded strings. I hope to be clear.
David
--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---