[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/OFS/Content/SQLScript - ISQLScript.py:1.8
Jim Fulton
jim@zope.com
Sat, 7 Sep 2002 12:19:21 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Content/SQLScript
In directory cvs.zope.org:/tmp/cvs-serv19433/lib/python/Zope/App/OFS/Content/SQLScript
Modified Files:
ISQLScript.py
Log Message:
More cleanup/refactoring of Schemas and forms. There's more to come,
but I'm checkpointing here.
I:
- Added schema field properties. These are like standard Python
properies except that they are derived from Schema fields.
- Decomposed Str fields into Bytes fields and Text fields.
Bytes fields contain 8-bit data and are stored as python strings.
Text fields contain written human discourse, and are stored as
unicode. It is invalid to store Python strings in Text fields or
unicode in Bytes fields.
- Moved converters from schemas to forms, where they are used.
- Widgets are now responsible for:
- Getting raw data from the request
- Converting raw data to application data
- Validating converted data against schema fields
- Began defining an error framework for errors in forms.
- Simplified FormViews to reflect new widget responsibilities.
- Added Bytes, Int and Float widgets and changed some application and
test code to use them.
=== Zope3/lib/python/Zope/App/OFS/Content/SQLScript/ISQLScript.py 1.7 => 1.8 ===
--- Zope3/lib/python/Zope/App/OFS/Content/SQLScript/ISQLScript.py:1.7 Thu Sep 5 14:55:02 2002
+++ Zope3/lib/python/Zope/App/OFS/Content/SQLScript/ISQLScript.py Sat Sep 7 12:18:50 2002
@@ -20,7 +20,7 @@
from Zope.ContextWrapper import ContextMethod
import Zope.Schema
-class SQLConnectionName(Zope.Schema.Str):
+class SQLConnectionName(Zope.Schema.Bytes):
"""SQL Connection Name"""
def items(self):
@@ -39,13 +39,13 @@
description="The Connection Name for the connection to be used.",
required=1)
- arguments = Zope.Schema.Str(
+ arguments = Zope.Schema.Bytes(
title="Arguments",
description="A set of attributes that can be used during the DTML "
"rendering process to provide dynamic data.",
required=0)
- source = Zope.Schema.Str(
+ source = Zope.Schema.Bytes(
title="Source",
description="The source of the page template.",
required=1)