Re: [Zope3-Users] Time for a Decimal field type in zope.schema?

2007-04-27 Thread Adam Summers

Hi,

Did the inclusion of Darryl's code ever get off the ground? I can't find
a Decimal in zope.schema in Zope3.3.1 ...

Regards,
Adam

Marius Gedminas wrote:

On Thu, 31 Aug 2006 20:29:49 +0700 Darryl Cousins
[EMAIL PROTECTED] wrote:
  

On Thu, 2006-08-31 at 15:07 +0300, Marius Gedminas wrote:


I am going to work on this today.
  

For what it may be worth, a Decimal field:

Code:
http://projects.treefernwebservices.co.nz/tfws.org.nz/file/trunk/src/tfws/field/field.py
Doctest:
http://www.tfws.org.nz/tfws.field.README.html



Looks nice.  Would you consider contributing it for the inclusion into the
Zope 3 core?  (I see that it is already licenced under the ZPL, but I do
not think I can just commit it into the Zope 3 repository under a different
name.)

I am attaching the diff showing my current working version, which mirrors
the existing zope.schema.Float field more closely.  As far as I can tell
your field/widget is better.  The only thing I do not see is a registration
for a IDisplayWidget.

Marius Gedminas
  



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Time for a Decimal field type in zope.schema?

2007-04-27 Thread Darryl Cousins
Hi,

No I don't know that it did. I wasn't at time a contributor to Zope. I
am now however so I have no excuse.

http://projects.treefernwebservices.co.nz/tfws.org.nz/file/trunk/src/tfws/field/README.txt

Best regards,
Darryl

On Fri, 2007-04-27 at 20:37 +0800, Adam Summers wrote:
 Hi,
 
 Did the inclusion of Darryl's code ever get off the ground? I can't find
 a Decimal in zope.schema in Zope3.3.1 ...
 
 Regards,
 Adam
 
 Marius Gedminas wrote:
  On Thu, 31 Aug 2006 20:29:49 +0700 Darryl Cousins
  [EMAIL PROTECTED] wrote:

  On Thu, 2006-08-31 at 15:07 +0300, Marius Gedminas wrote:
  
  I am going to work on this today.

  For what it may be worth, a Decimal field:
 
  Code:
  http://projects.treefernwebservices.co.nz/tfws.org.nz/file/trunk/src/tfws/field/field.py
  Doctest:
  http://www.tfws.org.nz/tfws.field.README.html
  
 
  Looks nice.  Would you consider contributing it for the inclusion into the
  Zope 3 core?  (I see that it is already licenced under the ZPL, but I do
  not think I can just commit it into the Zope 3 repository under a different
  name.)
 
  I am attaching the diff showing my current working version, which mirrors
  the existing zope.schema.Float field more closely.  As far as I can tell
  your field/widget is better.  The only thing I do not see is a registration
  for a IDisplayWidget.
 
  Marius Gedminas

  
 
  ___
  Zope3-users mailing list
  Zope3-users@zope.org
  http://mail.zope.org/mailman/listinfo/zope3-users
 
 
 ___
 Zope3-users mailing list
 Zope3-users@zope.org
 http://mail.zope.org/mailman/listinfo/zope3-users

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Time for a Decimal field type in zope.schema?

2006-09-01 Thread Gary Poster


On Aug 31, 2006, at 9:56 PM, Darryl Cousins wrote:


Hi Marius,

Cheers. I don't have checkin rights so I'll leave it to you (or  
another)

if it considered is worthwhile.


Darryl, your decimal field changes would be welcome, as would a  
currency field.  Unfortunately, having one person check in another's  
work in the Zope repository has legal complications, and in fact, in  
this transition period to the ZF, only ZC has the right to check in  
another's work.  Generally, it is /much/ better for a contributor to  
check in his own work.


Would you be willing to become a contributor?  Until the ZF is in  
full swing, the following procedure is still available and has the  
least ambiguity (from http://www.zope.org/DevHome/Subversion/FrontPage):



ContributorIntroduction (http://www.zope.org/DevHome/Subversion/ 
ContributorIntroduction) gives background information on the  
approach. ContributorFAQ (http://www.zope.org/DevHome/Subversion/ 
ContributorFAQ) summarizes questions and answers. Finally, the Zope  
Contributor Agreement (http://www.zope.org/DevHome/Subversion/ 
Contributor.pdf) is the legal agreement that gets signed and returned.



For reference, once the ZF is in full swing, the relevant parallel  
documents are here: http://www.zopefoundation.org/


Gary
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Time for a Decimal field type in zope.schema?

2006-09-01 Thread Darryl Cousins
Hi Gary,

Thanks for that. Yup, I'll follow up on your suggestion to become a
contributor. May help overcome lack of confidence and hone my abilities.

Coincidently I was working on Decimal and Currency today in building
views for CurrencyUtility. Decimal field needed a display widget -
UnicodeDisplayWidget didn't cut it because decimal.Decimal is security
proxied in views.

Code available at:
svn://svn.treefernwebservices.co.nz/var/svn/tfws.org.nz/trunk/src/tfws

In the meantime, copy paste it and say it's yours. ;-)

Sincere regards,
Darryl

On Fri, 2006-09-01 at 09:40 -0400, Gary Poster wrote:
 Darryl, your decimal field changes would be welcome, as would a  
 currency field.  Unfortunately, having one person check in another's  
 work in the Zope repository has legal complications, and in fact, in  
 this transition period to the ZF, only ZC has the right to check in  
 another's work.  Generally, it is /much/ better for a contributor to  
 check in his own work. 

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Time for a Decimal field type in zope.schema?

2006-08-31 Thread Marius Gedminas
On Fri, 7 Apr 2006 09:37:02 -0400
Gary Poster [EMAIL PROTECTED] wrote:

 On Apr 7, 2006, at 8:35 AM, Jeff Rush wrote:
  Perhaps this is an old topic, although I've done searches.  I've  
  seen the brief discussion about security proxies and the Decimal  
  type on zope3-users, but (to zope3-dev) what about getting it added  
  to the zope.schema as a first-class field type?  So we can have  
  auto-generated HTML forms and such?
 
  Has anyone already done this, in some Zope3 branch or private  
  development?
 
 Not as far as I know.
 
  If not, is there any good reason it should not happen?  Must Zope3  
  support Python versions prior to the introduction of the Decimal type?
 
 Not as far as I know.
 
  I'm willing to tackle it and make a submission, otherwise.
 
 +1

I am going to work on this today.

Marius Gedminas
-- 
You can't spell evil without vi.


pgp92jSDRH66d.pgp
Description: PGP signature
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Time for a Decimal field type in zope.schema?

2006-08-31 Thread Darryl Cousins
Hi,

For what it may be worth, a Decimal field:

Code:
http://projects.treefernwebservices.co.nz/tfws.org.nz/file/trunk/src/tfws/field/field.py
Doctest:
http://www.tfws.org.nz/tfws.field.README.html

And a currency type which uses it:

Code:
http://projects.treefernwebservices.co.nz/tfws.org.nz/file/trunk/src/tfws/currency/app.py
Doctest:
http://www.tfws.org.nz/tfws.currency.README.currency.html

Courteous thanks to plonemall.

Sincere regards,
Darryl


On Thu, 2006-08-31 at 15:07 +0300, Marius Gedminas wrote:
 On Fri, 7 Apr 2006 09:37:02 -0400
 Gary Poster [EMAIL PROTECTED] wrote:
 
  On Apr 7, 2006, at 8:35 AM, Jeff Rush wrote:
   Perhaps this is an old topic, although I've done searches.  I've  
   seen the brief discussion about security proxies and the Decimal  
   type on zope3-users, but (to zope3-dev) what about getting it added  
   to the zope.schema as a first-class field type?  So we can have  
   auto-generated HTML forms and such?
  
   Has anyone already done this, in some Zope3 branch or private  
   development?
  
  Not as far as I know.
  
   If not, is there any good reason it should not happen?  Must Zope3  
   support Python versions prior to the introduction of the Decimal type?
  
  Not as far as I know.
  
   I'm willing to tackle it and make a submission, otherwise.
  
  +1
 
 I am going to work on this today.
 
 Marius Gedminas
 ___
 Zope3-users mailing list
 Zope3-users@zope.org
 http://mail.zope.org/mailman/listinfo/zope3-users

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Time for a Decimal field type in zope.schema?

2006-08-31 Thread Marius Gedminas
On Thu, 31 Aug 2006 20:29:49 +0700 Darryl Cousins
[EMAIL PROTECTED] wrote:
 On Thu, 2006-08-31 at 15:07 +0300, Marius Gedminas wrote:
  I am going to work on this today.

 For what it may be worth, a Decimal field:
 
 Code:
 http://projects.treefernwebservices.co.nz/tfws.org.nz/file/trunk/src/tfws/field/field.py
 Doctest:
 http://www.tfws.org.nz/tfws.field.README.html

Looks nice.  Would you consider contributing it for the inclusion into the
Zope 3 core?  (I see that it is already licenced under the ZPL, but I do
not think I can just commit it into the Zope 3 repository under a different
name.)

I am attaching the diff showing my current working version, which mirrors
the existing zope.schema.Float field more closely.  As far as I can tell
your field/widget is better.  The only thing I do not see is a registration
for a IDisplayWidget.

Marius Gedminas
-- 
Think different? I'd be happy if most people would just think...


zope3-decimal-field-and-widget.patch
Description: Binary data


pgpThoaGyHTMB.pgp
Description: PGP signature
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Time for a Decimal field type in zope.schema?

2006-08-31 Thread Lennart Regebro

On 8/31/06, Darryl Cousins [EMAIL PROTECTED] wrote:

Hi,

For what it may be worth, a Decimal field:


Just a note: The format should be localized. In some countries 0,01 is used.
(yes, a comma).
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Time for a Decimal field type in zope.schema?

2006-08-31 Thread Darryl Cousins
Hi Marius,

Cheers. I don't have checkin rights so I'll leave it to you (or another)
if it considered is worthwhile.

Sincere regards,
Darryl.

On Fri, 2006-09-01 at 00:21 +0300, Marius Gedminas wrote:
 I committed my version (somewhat changed from the diff I posted here)
 into
 Zope 3 trunk.  Feel free to update zope.schema.Decimal with features
 from
 your widget that my version doesn't have (like normalization to a
 given
 number of decimal points).
 
 reinventing-the-bicycle-proudly
 Marius Gedminas 

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Time for a Decimal field type in zope.schema?

2006-04-07 Thread Jeff Rush
Perhaps this is an old topic, although I've done searches.  I've seen the 
brief discussion about security proxies and the Decimal type on zope3-users, 
but (to zope3-dev) what about getting it added to the zope.schema as a 
first-class field type?  So we can have auto-generated HTML forms and such?


Has anyone already done this, in some Zope3 branch or private development?

If not, is there any good reason it should not happen?  Must Zope3 support 
Python versions prior to the introduction of the Decimal type?


I'm willing to tackle it and make a submission, otherwise.

-Jeff
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Time for a Decimal field type in zope.schema?

2006-04-07 Thread Gary Poster


On Apr 7, 2006, at 8:35 AM, Jeff Rush wrote:

Perhaps this is an old topic, although I've done searches.  I've  
seen the brief discussion about security proxies and the Decimal  
type on zope3-users, but (to zope3-dev) what about getting it added  
to the zope.schema as a first-class field type?  So we can have  
auto-generated HTML forms and such?


Has anyone already done this, in some Zope3 branch or private  
development?


Not as far as I know.

If not, is there any good reason it should not happen?  Must Zope3  
support Python versions prior to the introduction of the Decimal type?


Not as far as I know.


I'm willing to tackle it and make a submission, otherwise.


+1

Gary
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users