[Zope3-checkins] CVS: Zope3/lib/python/Zope/Schema - IField.py:1.5.2.1 _Field.py:1.3.2.1 __init__.py:1.2.2.1

Jim Fulton jim@zope.com
Thu, 3 Oct 2002 18:16:53 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/Schema
In directory cvs.zope.org:/tmp/cvs-serv27190/lib/python/Zope/Schema

Modified Files:
      Tag: ZopeDublinCore-branch
	IField.py _Field.py __init__.py 
Log Message:
Checking in still-unfinished dublin core work on
ZopeDublinCore-branch.

To do:

  - Make a number of existing tests work now that a lot of views 
    need to generate events. (Perhaps these will need to 
    be factored into adapters and views. Sigh.)

  - Make object events able to compute locations for there
    objects when an location hasn't been provided to the constructor.

  - Add some UI for editing at least some meta data.

Handling of lists (e.g. subjects, creators) may need some more thought
as these will often want to come from standard system-provided lists.




=== Zope3/lib/python/Zope/Schema/IField.py 1.5 => 1.5.2.1 ===
--- Zope3/lib/python/Zope/Schema/IField.py:1.5	Thu Oct  3 15:44:26 2002
+++ Zope3/lib/python/Zope/Schema/IField.py	Thu Oct  3 18:16:52 2002
@@ -169,6 +169,9 @@
         
 class IFloat(IEnumeratable, IOrderable):
     u"""Describes the footprint of a Float variable."""
+        
+class IDatetime(IEnumeratable, IOrderable):
+    u"""Describes the footprint of a datetime variable."""
 
 def _fields(values):
     for value in values:


=== Zope3/lib/python/Zope/Schema/_Field.py 1.3 => 1.3.2.1 ===
--- Zope3/lib/python/Zope/Schema/_Field.py:1.3	Wed Sep 11 18:06:41 2002
+++ Zope3/lib/python/Zope/Schema/_Field.py	Thu Oct  3 18:16:52 2002
@@ -26,6 +26,7 @@
 from _bootstrapFields import Field, Container, Iteratable, Orderable, Sized
 from _bootstrapFields import Enumeratable, Text, Bool, Int
 from FieldProperty import FieldProperty
+from datetime import datetime
 
 # Fix up bootstrap field types
 Field.title       = FieldProperty(IField.IField['title'])
@@ -60,6 +61,11 @@
     __implements__ = IField.IFloat
     _type = float
 
+class Datetime(Enumeratable, Orderable):
+    __doc__ = IField.IDatetime.__doc__
+    __implements__ = IField.IDatetime
+    _type = datetime
+
 def _validate_sequence(value_types, value, errors=None):
     if errors is None:
         errors = []
@@ -142,3 +148,4 @@
                 
         finally:
             errors = None
+


=== Zope3/lib/python/Zope/Schema/__init__.py 1.2 => 1.2.2.1 ===
--- Zope3/lib/python/Zope/Schema/__init__.py:1.2	Sat Sep  7 12:18:51 2002
+++ Zope3/lib/python/Zope/Schema/__init__.py	Thu Oct  3 18:16:52 2002
@@ -15,5 +15,8 @@
 
 $Id$
 """
-from _Field import Field, Bytes, Text, Bool, Int, Float, Tuple, List, Dict
+
+from _Field import Field, Container, Iteratable, Orderable, Sized, Enumeratable
+from _Field import Sequence
+from _Field import Bytes, Text, Bool, Int, Float, Tuple, List, Dict, Datetime
 from _Schema import validateMapping, validateMappingAll, getFields