[Zope3-checkins] CVS: Zope3/src/zope/app/form - utility.py:1.1.2.3 widget.py:1.1.2.3
Tim Peters
tim.one@comcast.net
Tue, 24 Dec 2002 21:21:30 -0500
Update of /cvs-repository/Zope3/src/zope/app/form
In directory cvs.zope.org:/tmp/cvs-serv19240/src/zope/app/form
Modified Files:
Tag: NameGeddon-branch
utility.py widget.py
Log Message:
Whitespace normalization, via Python's Tools/scripts/reindent.py. The
files are fixed-points of that script now. Fixed a few cases where
code relied on significant trailing whitespace (ouch).
=== Zope3/src/zope/app/form/utility.py 1.1.2.2 => 1.1.2.3 ===
--- Zope3/src/zope/app/form/utility.py:1.1.2.2 Tue Dec 24 07:51:04 2002
+++ Zope3/src/zope/app/form/utility.py Tue Dec 24 21:20:28 2002
@@ -2,14 +2,14 @@
#
# Copyright (c) 2002 Zope Corporation and Contributors.
# All Rights Reserved.
-#
+#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
-#
+#
##############################################################################
"""Form utility functions
@@ -73,8 +73,8 @@
widget = widget(field, view.request)
if IWidget.isImplementedBy(widget):
# Yee ha! We have a widget now, save it
- setattr(view, name, widget)
-
+ setattr(view, name, widget)
+
if not IWidget.isImplementedBy(widget):
raise TypeError(
"The %s view attribute named, %s, should be a widget, "
@@ -138,7 +138,7 @@
if v.__class__ != AttributeError:
raise
value = None
-
+
setUpWidget(view, name, field, value,
prefix = prefix, force = force, vname = vname)
@@ -193,7 +193,7 @@
if errors:
raise WidgetsError(*errors)
-
+
return result
def getWidgetsDataForContent(view, schema, content=None, required=0,
@@ -209,11 +209,11 @@
the schema will be set, at least for required fields. If some data
for required fields are missing from the input, an error will be
raised.
-
+
"""
-
+
data = getWidgetsData(view, schema, required, names)
-
+
if content is None:
content = view.context
@@ -225,7 +225,6 @@
setattr(content, name, data[name])
except Exception, v:
errors.append(v)
-
+
if errors:
raise WidgetsError(*errors)
-
=== Zope3/src/zope/app/form/widget.py 1.1.2.2 => 1.1.2.3 ===
--- Zope3/src/zope/app/form/widget.py:1.1.2.2 Tue Dec 24 07:51:04 2002
+++ Zope3/src/zope/app/form/widget.py Tue Dec 24 21:20:28 2002
@@ -2,14 +2,14 @@
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
-#
+#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
-#
+#
##############################################################################
"""
$Id$
@@ -68,7 +68,7 @@
def __init__(self, widget, **kw):
self.widget = widget
self.kw = kw
-
+
def __call__(self, context, request):
instance = self.widget(context, request)
for item in self.kw.items():