On Tuesday 16 May 2006 02:48, Malcolm Tredinnick wrote:

> Thinking out loud a bit here, more as a reminder to myself: but I
> wonder _why_ this worked? If you have no __str__ method, it will fall
> back to __repr__, so you should have been seeing the same output
> regardless. Are we stomping on class __repr__ functions internally,
> is anybody aware?

Yeah, I wondered about this too.  The answer is that django defines both 
__str__ and __repr__ on Model, so if your class defines only __repr__, 
it never gets called.

Luke


-- 
"Oh, look. I appear to be lying at the bottom of a very deep, dark 
hole. That seems a familiar concept. What does it remind me of? Ah, I 
remember. Life."  (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 django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to