[Zope3-checkins] CVS: Zope3/src/zope/schema - _field.py:1.20.4.1
interfaces.py:1.28.2.1
Sidnei da Silva
sidnei at x3ng.com.br
Tue Aug 12 14:39:07 EDT 2003
Update of /cvs-repository/Zope3/src/zope/schema
In directory cvs.zope.org:/tmp/cvs-serv32308/src/zope/schema
Modified Files:
Tag: dreamcatcher-ttwschema-branch
_field.py interfaces.py
Log Message:
A bit more progress on setting field's schema to the right types. More fixes on ZCML registration/security assertions of basic fields types.
=== Zope3/src/zope/schema/_field.py 1.20 => 1.20.4.1 ===
--- Zope3/src/zope/schema/_field.py:1.20 Sat Aug 2 13:24:57 2003
+++ Zope3/src/zope/schema/_field.py Tue Aug 12 13:39:03 2003
@@ -84,7 +84,7 @@
Traceback (most recent call last):
...
ValidationError: (u'Constraint not satisfied', ' foo y.z bat')
-
+
"""
v = str(u)
self.validate(v)
@@ -300,7 +300,7 @@
...
ValidationError: ('Invalid uri', 'www.python.org/foo/bar')
"""
-
+
super(URI, self)._validate(value)
if _isuri(value):
return
@@ -377,5 +377,5 @@
self.validate(v)
return v
-
-
+
+
=== Zope3/src/zope/schema/interfaces.py 1.28 => 1.28.2.1 ===
--- Zope3/src/zope/schema/interfaces.py:1.28 Tue Aug 5 10:25:19 2003
+++ Zope3/src/zope/schema/interfaces.py Tue Aug 12 13:39:03 2003
@@ -120,7 +120,7 @@
default=False)
default = Field(
- title=_(u"default field value if no value is present"),
+ title=_(u"Default Value"),
description=_(u"""The field default value may be None or a legal
field value""")
)
@@ -264,6 +264,12 @@
class IBool(IField):
u"""Boolean Field."""
+ default = Bool(
+ title=_(u"Default Value"),
+ description=_(u"""The field default value may be None or a legal
+ field value""")
+ )
+
class IBytes(IMinMaxLen, IEnumerated, IIterable, IField):
# XXX IEnumerated will be removed in the future.
u"""Field containing a byte string (like the python str).
@@ -299,6 +305,24 @@
# need the IEnumerated interface.
u"""Field containing an Integer Value."""
+ min = Int(
+ title=_(u"Start of the range"),
+ required=False,
+ default=None
+ )
+
+ max = Int(
+ title=_(u"End of the range (excluding the value itself)"),
+ required=False,
+ default=None
+ )
+
+ default = Int(
+ title=_(u"Default Value"),
+ description=_(u"""The field default value may be None or a legal
+ field value""")
+ )
+
class IEnumeratedInt(IInt, IEnumerated):
u"""Field containing an Integer Value.
@@ -348,7 +372,7 @@
A unique identifier is either an absolute URI ir a dotted name.
If it's a dotted name, it should have a module/package name as a prefix.
-
+
"""
More information about the Zope3-Checkins
mailing list