On 2/2/06, Randall <[EMAIL PROTECTED]> wrote:
>
> "...displaying that is the human-understandable form of that particular
> object"
>
> Ideally, yes.  But when dealing with end users, things need to be
> simple and pretty.   Output from permission object:
>
> <WPermission 17 permissionId=u'custom_query' description=None>
>
> The permission name is custom_query, but it's not easy to see and end
> users are likely to be confused.  "Randall, what is this garbage on the
> screen?"  I may be the only person that has this view or maybe fastdata
> interfaces aren't intended for Joe User.

Just override __str__ to get the form that *is* understandable to human beings.

> Here is one possible solution that won't break things.  When passing in
> form_fields to DataController, a form_fields list item can be a tuple
> like list_fields arguments.  The additional field is the name of the
> attribute to call on the data object to return a display name.  If it
> was a dict instead of a tuple, this functionality could be further
> extended.

Actually, Jorge has a good point about possibly wanting HTML output.
I'd rather just leave it at __str__/__unicode__ for now. You'd
probably really want some kind of third party object to decorate the
business object for display in various contexts.

Kevin

--
Kevin Dangoor
Author of the Zesty News RSS newsreader

email: [EMAIL PROTECTED]
company: http://www.BlazingThings.com
blog: http://www.BlueSkyOnMars.com

Reply via email to