'Evening, Zopistas.

I'm developing an accounting product right now, and one of the more
interesting aspects of how to solve this issue is how do handle
currencies.  I've decided to let each entry (transaction) know about
the currency it was in.  At a later stage, the user is given the
option to convert the currency to something else, but only for
display-purposes and nothing persistent.

This raises a number of interesting issues; I'll try to be brief.

  - I'd like the currency-attribute itself to know about how how
    display itself (ie. this shouldn't be a method of the class
    containing the property).

  - I'd like the currency-attribute itself to know how to convert
    itself to other currencies.

This would allow me to say::

   transaction.currency.set_currency('FRF') # French Francs

And then this::

   transaction.currency.display_in('NOK') # Norwegian kroners

would render the string::

   NOK 125.00

for example.  Or::


would render the float::


or something like that.  I'm not entierly sure of the API, yet.

The point is, I'd like to delegate attribute-behaviour to the
attribute itself.  Currently, I don't see any easy way to do this with
Zope.  I gather that there isn't either, based on the links I give
below.  It seems that many projects are implementing their own

Summarizing: I'd like to volunteer time to a project/proposal that
would take care of properties once and for all.  I'm proposing to
create a new property model where we have "pluggable" properties that
is more lously coupled with the management of properties and allows
the developer to add custom-made properties (much like

I also propose to make the property itself know how to render a widget
for it, given an environment.  A property of type 'date', for example,
could render six HTML select-lists given a HTML-environment (year,
month, day, hour, minute (second, maybe), timezone).

The functionality of these widgets should be a separated from the
properties, naturally.  It should also be pluggable.  I'm thinking
pluggable in a site-wide context here.

Whatchya think?


Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to