Hi,

> You mean you want a declaration for one field that says "this field is  
> the __unicode__"-representation?

Yep

> What is the behavior for several such columns having that attribute?

Exception when defining the class

> How is coercion/decoding handled, which btw your example  
> lacks?

Normally you'd use a unicode column and avoid this issue. If you use a
string column, then it does the default python conversion, just like
my example.

> class UnicodeEntity(Entity):
>     UNICODE_COL = None
>     def __unicode__(self):
>        return getattr(self, self.UNICODE_COL)

Well, that is a step in the right direction.

Paul

-- 
You received this message because you are subscribed to the Google Groups 
"SQLElixir" 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/sqlelixir?hl=en.

Reply via email to