[Product-Developers] Re: hidden description in event object

Maurits van Rees m.van.rees at zestsoftware.nl
Fri Mar 13 09:25:45 UTC 2009


deesto, on 2009-03-12:
>
>
> Hi Maurits,
>
> On Mar 12, 2009, at 11:32 AM, Maurits van Rees-3 (via Nabble) wrote:
>> If you are overriding so many things of that field, I would say: just
>> create a new field.  Literally copy over the lines of ATEvent and
>> change it to what you want.
>
> Would you recommend doing so even though the basic function remains  
> the same, and I just need to change a small thing or two about each  
> attribute (such as the wording in the description of the field,  
> etc.)?  Wouldn't I then lose the advantages of any updated versions of  
> the ATEvent as they come along?

Yes, you would loose those advantages, but what I saw is not a small
thing or two, but about six changes to the description field.

What I meant is: do import the ATEvent schema, but completely override
the description field with your own.

The end result should be the same; just a question of preference of
what is clearer and cleaner.

>> An Archetypes field also has a raw version. In this case it should be
>> self.getRawDescription().  See if that gives you what you want.
>
> Currently I pull this field into the object thusly:
>      ...
>      copied_fields['description'],
>      ...
>
> How/where would I use getRawDescription() to pull in the raw version  
> into the object?  or is this not possible with copied fields?

In a template you would use context/Description to get the normal
description.  If you use context/getRawDescription you get the raw
description.

It may or may not make a difference with the description field.  But
at least when you have a rich text field called 'body' and you have
restructured text as the input, and html as output, then getRawBody
will get you the literal raw restructured text that is stored in the
field and getBody will get you the html version.

It may be worth a shot; if you don't get progress in 15 minutes, then
forget this email. :-)

Cheers,

-- 
Maurits van Rees | http://maurits.vanrees.org/
            Work | http://zestsoftware.nl/
"This is your day, don't let them take it away." [Barlow Girl]





More information about the Product-Developers mailing list