[Testbot] Plone 5.0 - Python 2.7 - Build # 3100 - Still failing! - 0 failure(s)
jenkins at plone.org
jenkins at plone.org
Sat Aug 23 06:58:34 UTC 2014
-------------------------------------------------------------------------------
Plone 5.0 - Python 2.7 - Build # 3100 - Still Failing!
-------------------------------------------------------------------------------
http://jenkins.plone.org/job/plone-5.0-python-2.7/3100/
-------------------------------------------------------------------------------
CHANGES
-------------------------------------------------------------------------------
Repository: plone.formwidget.namedfile
Branch: refs/heads/master
Date: 2014-08-23T01:22:53+02:00
Author: Gil Forcada (gforcada) <gforcada at gnome.org>
Commit: https://github.com/plone/plone.formwidget.namedfile/commit/b26f0be19eb29b788674c762a18ce2192f8720d4
Whitespaces cleanup
Files changed:
M plone/formwidget/namedfile/configure.zcml
M plone/formwidget/namedfile/converter.py
M plone/formwidget/namedfile/interfaces.py
M plone/formwidget/namedfile/validator.py
diff --git a/plone/formwidget/namedfile/configure.zcml b/plone/formwidget/namedfile/configure.zcml
index 2952bf3..f01d307 100644
--- a/plone/formwidget/namedfile/configure.zcml
+++ b/plone/formwidget/namedfile/configure.zcml
@@ -8,7 +8,7 @@
<include package="z3c.form" file="meta.zcml" />
<include package="z3c.form" />
<include package="plone.namedfile" />
-
+
<i18n:registerTranslations directory="locales" />
<adapter factory=".converter.NamedDataConverter" />
@@ -20,7 +20,7 @@
interface=".interfaces.INamedFileWidget"
/>
</class>
-
+
<class class=".widget.NamedImageWidget">
<require
permission="zope.Public"
@@ -37,7 +37,7 @@
layer="z3c.form.interfaces.IFormLayer"
template="file_display.pt"
/>
-
+
<z3c:widgetTemplate
mode="display"
widget=".interfaces.INamedImageWidget"
diff --git a/plone/formwidget/namedfile/converter.py b/plone/formwidget/namedfile/converter.py
index f96660a..4d7f26a 100644
--- a/plone/formwidget/namedfile/converter.py
+++ b/plone/formwidget/namedfile/converter.py
@@ -18,16 +18,16 @@ def toWidgetValue(self, value):
return value
def toFieldValue(self, value):
-
+
if value is None or value == '':
return self.field.missing_value
if INamed.providedBy(value):
return value
elif isinstance(value, FileUpload):
-
+
filename = safe_basename(value.filename)
-
+
if filename is not None and not isinstance(filename, unicode):
# Work-around for
# https://bugs.launchpad.net/zope2/+bug/499696
@@ -39,6 +39,6 @@ def toFieldValue(self, value):
return self.field._type(data=data, filename=filename)
else:
return self.field.missing_value
-
+
else:
return self.field._type(data=str(value))
\ No newline at end of file
diff --git a/plone/formwidget/namedfile/interfaces.py b/plone/formwidget/namedfile/interfaces.py
index b93b083..bdab6ce 100644
--- a/plone/formwidget/namedfile/interfaces.py
+++ b/plone/formwidget/namedfile/interfaces.py
@@ -4,21 +4,21 @@
class INamedFileWidget(IFileWidget):
"""A widget for a named file field
"""
-
+
allow_nochange = schema.Bool(title=u"Allow user to keep existing data in lieu of uploading a file?")
filename = schema.TextLine(title=u"Name of the underlying file", required=False)
filename_encoded = schema.TextLine(title=u"Filename, URL-encoded", required=False)
file_size = schema.Int(title=u"Size in kb", required=True, default=0)
download_url = schema.URI(title=u"File download URL", required=False)
-
+
class INamedImageWidget(INamedFileWidget):
"""A widget for a named image field
"""
-
+
width = schema.Int(title=u"Image width", min=0, required=False)
height = schema.Int(title=u"Image height", min=0, required=False)
-
+
thumb_width = schema.Int(title=u"Thumbnail image width", min=0, required=False)
thumb_height = schema.Int(title=u"Thuimbnail image height", min=0, required=False)
-
+
alt = schema.TextLine(title=u"Image alternative text", required=False)
\ No newline at end of file
diff --git a/plone/formwidget/namedfile/validator.py b/plone/formwidget/namedfile/validator.py
index e237c6a..c9749af 100644
--- a/plone/formwidget/namedfile/validator.py
+++ b/plone/formwidget/namedfile/validator.py
@@ -8,7 +8,7 @@ class InvalidState(ValidationError):
__doc__ = _(u'No file provided.')
class NamedFileWidgetValidator(validator.SimpleFieldValidator):
-
+
def validate(self, value, force=False):
"""See interfaces.IValidator"""
action = self.request.get("%s.action" % self.widget.name, None)
-------------------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CHANGES.log
Type: application/octet-stream
Size: 4337 bytes
Desc: not available
URL: <http://lists.plone.org/pipermail/plone-testbot/attachments/20140823/2733d25a/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build.log
Type: application/octet-stream
Size: 118997 bytes
Desc: not available
URL: <http://lists.plone.org/pipermail/plone-testbot/attachments/20140823/2733d25a/attachment-0003.obj>
More information about the Testbot
mailing list