# HG changeset patch # User Thierry Florac # Date 1434527764 -7200 # Node ID 3db593855266ef844df84d4e15eeba68df69f8f7 # Parent ee5900572943bf71321f7a217a1f8d647e1ff2e5 Version 0.1.0 diff -r ee5900572943 -r 3db593855266 .installed.cfg --- a/.installed.cfg Wed May 20 12:23:10 2015 +0200 +++ b/.installed.cfg Wed Jun 17 09:56:04 2015 +0200 @@ -1,31 +1,55 @@ [buildout] -installed_develop_eggs = /home/borax/Dropbox/src/PyAMS/pyams_file/develop-eggs/pyams-file.egg-link -parts = i18n pyflakes test package +installed_develop_eggs = +parts = package i18n pyflakes test + +[package] +__buildout_installed__ = /home/tflorac/Dropbox/src/PyAMS/pyams_file/bin/pserve + /home/tflorac/Dropbox/src/PyAMS/pyams_file/bin/pviews + /home/tflorac/Dropbox/src/PyAMS/pyams_file/bin/ptweens + /home/tflorac/Dropbox/src/PyAMS/pyams_file/bin/pcreate + /home/tflorac/Dropbox/src/PyAMS/pyams_file/bin/prequest + /home/tflorac/Dropbox/src/PyAMS/pyams_file/bin/pshell + /home/tflorac/Dropbox/src/PyAMS/pyams_file/bin/pdistreport + /home/tflorac/Dropbox/src/PyAMS/pyams_file/bin/proutes +__buildout_signature__ = zc.recipe.egg-2.0.1-py3.4.egg setuptools-12.0.5-py3.4.egg zc.buildout-2.3.1-py3.4.egg +_b = /home/tflorac/Dropbox/src/PyAMS/pyams_file/bin +_d = /home/tflorac/Dropbox/src/PyAMS/pyams_file/develop-eggs +_e = /var/local/env/pyams/eggs +bin-directory = /home/tflorac/Dropbox/src/PyAMS/pyams_file/bin +develop-eggs-directory = /home/tflorac/Dropbox/src/PyAMS/pyams_file/develop-eggs +eggs = pyams_file + pyramid + python-magic + zope.component + zope.copy + zope.interface +eggs-directory = /var/local/env/pyams/eggs +recipe = zc.recipe.egg [i18n] -__buildout_installed__ = /home/borax/Dropbox/src/PyAMS/pyams_file/bin/pybabel - /home/borax/Dropbox/src/PyAMS/pyams_file/bin/polint - /home/borax/Dropbox/src/PyAMS/pyams_file/bin/pot-create +__buildout_installed__ = /home/tflorac/Dropbox/src/PyAMS/pyams_file/bin/pybabel + /home/tflorac/Dropbox/src/PyAMS/pyams_file/bin/polint + /home/tflorac/Dropbox/src/PyAMS/pyams_file/bin/pot-create __buildout_signature__ = zc.recipe.egg-2.0.1-py3.4.egg setuptools-12.0.5-py3.4.egg zc.buildout-2.3.1-py3.4.egg -_b = /home/borax/Dropbox/src/PyAMS/pyams_file/bin -_d = /home/borax/Dropbox/src/PyAMS/pyams_file/develop-eggs +_b = /home/tflorac/Dropbox/src/PyAMS/pyams_file/bin +_d = /home/tflorac/Dropbox/src/PyAMS/pyams_file/develop-eggs _e = /var/local/env/pyams/eggs -bin-directory = /home/borax/Dropbox/src/PyAMS/pyams_file/bin -develop-eggs-directory = /home/borax/Dropbox/src/PyAMS/pyams_file/develop-eggs +bin-directory = /home/tflorac/Dropbox/src/PyAMS/pyams_file/bin +develop-eggs-directory = /home/tflorac/Dropbox/src/PyAMS/pyams_file/develop-eggs eggs = babel lingua eggs-directory = /var/local/env/pyams/eggs recipe = zc.recipe.egg [pyflakes] -__buildout_installed__ = /home/borax/Dropbox/src/PyAMS/pyams_file/bin/pyflakes - /home/borax/Dropbox/src/PyAMS/pyams_file/bin/pyflakes +__buildout_installed__ = /home/tflorac/Dropbox/src/PyAMS/pyams_file/bin/pyflakes + /home/tflorac/Dropbox/src/PyAMS/pyams_file/bin/pyflakes __buildout_signature__ = zc.recipe.egg-2.0.1-py3.4.egg setuptools-12.0.5-py3.4.egg zc.buildout-2.3.1-py3.4.egg -_b = /home/borax/Dropbox/src/PyAMS/pyams_file/bin -_d = /home/borax/Dropbox/src/PyAMS/pyams_file/develop-eggs +_b = /home/tflorac/Dropbox/src/PyAMS/pyams_file/bin +_d = /home/tflorac/Dropbox/src/PyAMS/pyams_file/develop-eggs _e = /var/local/env/pyams/eggs -bin-directory = /home/borax/Dropbox/src/PyAMS/pyams_file/bin -develop-eggs-directory = /home/borax/Dropbox/src/PyAMS/pyams_file/develop-eggs +bin-directory = /home/tflorac/Dropbox/src/PyAMS/pyams_file/bin +develop-eggs-directory = /home/tflorac/Dropbox/src/PyAMS/pyams_file/develop-eggs eggs = pyflakes eggs-directory = /var/local/env/pyams/eggs entry-points = pyflakes=pyflakes.scripts.pyflakes:main @@ -34,48 +58,16 @@ scripts = pyflakes [test] -__buildout_installed__ = /home/borax/Dropbox/src/PyAMS/pyams_file/parts/test - /home/borax/Dropbox/src/PyAMS/pyams_file/bin/test -__buildout_signature__ = zc.recipe.testrunner-2.0.0-py3.4.egg zc.recipe.egg-2.0.1-py3.4.egg setuptools-12.0.5-py3.4.egg zope.testrunner-4.4.6-py3.4.egg zc.buildout-2.3.1-py3.4.egg zope.interface-4.1.2-py3.4-linux-x86_64.egg zope.exceptions-4.0.7-py3.4.egg six-8ad56e9feeb914de21341cbb261cc34e -_b = /home/borax/Dropbox/src/PyAMS/pyams_file/bin -_d = /home/borax/Dropbox/src/PyAMS/pyams_file/develop-eggs +__buildout_installed__ = /home/tflorac/Dropbox/src/PyAMS/pyams_file/parts/test + /home/tflorac/Dropbox/src/PyAMS/pyams_file/bin/test +__buildout_signature__ = zc.recipe.testrunner-2.0.0-py3.4.egg zc.recipe.egg-2.0.1-py3.4.egg setuptools-12.0.5-py3.4.egg zope.testrunner-4.4.6-py3.4.egg zc.buildout-2.3.1-py3.4.egg zope.interface-4.1.2-py3.4-linux-x86_64.egg zope.exceptions-4.0.7-py3.4.egg six-e6b62e54b4df360c40dfcbb76c1ecf1a +_b = /home/tflorac/Dropbox/src/PyAMS/pyams_file/bin +_d = /home/tflorac/Dropbox/src/PyAMS/pyams_file/develop-eggs _e = /var/local/env/pyams/eggs -bin-directory = /home/borax/Dropbox/src/PyAMS/pyams_file/bin -develop-eggs-directory = /home/borax/Dropbox/src/PyAMS/pyams_file/develop-eggs +bin-directory = /home/tflorac/Dropbox/src/PyAMS/pyams_file/bin +develop-eggs-directory = /home/tflorac/Dropbox/src/PyAMS/pyams_file/develop-eggs eggs = pyams_file [test] eggs-directory = /var/local/env/pyams/eggs -location = /home/borax/Dropbox/src/PyAMS/pyams_file/parts/test +location = /home/tflorac/Dropbox/src/PyAMS/pyams_file/parts/test recipe = zc.recipe.testrunner -script = /home/borax/Dropbox/src/PyAMS/pyams_file/bin/test - -[package] -__buildout_installed__ = /home/borax/Dropbox/src/PyAMS/pyams_file/bin/pcreate - /home/borax/Dropbox/src/PyAMS/pyams_file/bin/proutes - /home/borax/Dropbox/src/PyAMS/pyams_file/bin/pshell - /home/borax/Dropbox/src/PyAMS/pyams_file/bin/pviews - /home/borax/Dropbox/src/PyAMS/pyams_file/bin/ptweens - /home/borax/Dropbox/src/PyAMS/pyams_file/bin/pserve - /home/borax/Dropbox/src/PyAMS/pyams_file/bin/pdistreport - /home/borax/Dropbox/src/PyAMS/pyams_file/bin/prequest -__buildout_signature__ = zc.recipe.egg-2.0.1-py3.4.egg setuptools-12.0.5-py3.4.egg zc.buildout-2.3.1-py3.4.egg -_b = /home/borax/Dropbox/src/PyAMS/pyams_file/bin -_d = /home/borax/Dropbox/src/PyAMS/pyams_file/develop-eggs -_e = /var/local/env/pyams/eggs -bin-directory = /home/borax/Dropbox/src/PyAMS/pyams_file/bin -develop-eggs-directory = /home/borax/Dropbox/src/PyAMS/pyams_file/develop-eggs -eggs = pyams_file - pyramid - python-magic - zope.component - zope.interface -eggs-directory = /var/local/env/pyams/eggs -recipe = zc.recipe.egg - -[buildout] -parts = pyflakes test package i18n - -[buildout] -parts = test package i18n pyflakes - -[buildout] -parts = package i18n pyflakes test +script = /home/tflorac/Dropbox/src/PyAMS/pyams_file/bin/test diff -r ee5900572943 -r 3db593855266 src/pyams_file.egg-info/SOURCES.txt --- a/src/pyams_file.egg-info/SOURCES.txt Wed May 20 12:23:10 2015 +0200 +++ b/src/pyams_file.egg-info/SOURCES.txt Wed Jun 17 09:56:04 2015 +0200 @@ -34,13 +34,11 @@ src/pyams_file/views/__init__.py src/pyams_file/views/file.py src/pyams_file/widget/__init__.py -src/pyams_file/widget/configure.zcml src/pyams_file/widget/templates/file-display.pt src/pyams_file/widget/templates/file-input.pt src/pyams_file/widget/templates/image-display.pt src/pyams_file/widget/templates/image-input.pt src/pyams_file/zmi/__init__.py -src/pyams_file/zmi/configure.zcml src/pyams_file/zmi/file.py src/pyams_file/zmi/image.py src/pyams_file/zmi/templates/image-crop.pt diff -r ee5900572943 -r 3db593855266 src/pyams_file.egg-info/requires.txt --- a/src/pyams_file.egg-info/requires.txt Wed May 20 12:23:10 2015 +0200 +++ b/src/pyams_file.egg-info/requires.txt Wed Jun 17 09:56:04 2015 +0200 @@ -3,6 +3,7 @@ pyramid python-magic zope.component +zope.copy zope.interface [test] diff -r ee5900572943 -r 3db593855266 src/pyams_file/widget/__init__.py --- a/src/pyams_file/widget/__init__.py Wed May 20 12:23:10 2015 +0200 +++ b/src/pyams_file/widget/__init__.py Wed Jun 17 09:56:04 2015 +0200 @@ -44,10 +44,12 @@ deleted = self.widget.request.params.get(deleted_field_name) if deleted: return DELETED_FILE - if value is None or value == '': + if (value is None) or (value is NOT_CHANGED) or (value == ''): return NOT_CHANGED elif isinstance(value, FieldStorage): return value.filename, value.file + elif isinstance(value, tuple): + return value else: return toBytes(value) diff -r ee5900572943 -r 3db593855266 src/pyams_file/widget/templates/file-input.pt --- a/src/pyams_file/widget/templates/file-input.pt Wed May 20 12:23:10 2015 +0200 +++ b/src/pyams_file/widget/templates/file-input.pt Wed Jun 17 09:56:04 2015 +0200 @@ -25,7 +25,7 @@  –  Kb
-
-