[Checkins] SVN: z3c.form/trunk/ Get ready for 1.3.0.

Stephan Richter srichter at cosmos.phy.tufts.edu
Fri Jun 22 12:43:47 EDT 2007


Log message for revision 76941:
  Get ready for 1.3.0.
  
  - Move TODOS to project level. I think this means that they are picked 
    up in the release and we get a higher rating in the cheeseshop.
  
  - Merged Roger's changes located in the code to the canonical location.
  
  - Removed trailing whitespaces from util.
  
  

Changed:
  U   z3c.form/trunk/CHANGES.txt
  A   z3c.form/trunk/TODOS.txt
  U   z3c.form/trunk/setup.py
  D   z3c.form/trunk/src/z3c/form/CHANGES.txt
  D   z3c.form/trunk/src/z3c/form/TODO.txt
  U   z3c.form/trunk/src/z3c/form/util.py

-=-
Modified: z3c.form/trunk/CHANGES.txt
===================================================================
--- z3c.form/trunk/CHANGES.txt	2007-06-22 16:13:33 UTC (rev 76940)
+++ z3c.form/trunk/CHANGES.txt	2007-06-22 16:43:46 UTC (rev 76941)
@@ -2,12 +2,53 @@
 CHANGES
 =======
 
-Version 1.3.0 (6/??/2007)
+Version 1.3.0 (6/22/2007)
 -------------------------
 
-- Documentation: Integrated English language and content review improvements
-  by Roy Mathew in ``form.txt``.
+- Feature: In an edit form applying the data and generating all necessary
+  messages was all done within the "Apply" button handler. Now the actual task
+  of storing is factored out into a new method called "applyChanges(data)",
+  which returns whether the data has been changed. This is useful for forms
+  not dealing with objects.
 
+- Feature: Added support for ``hidden`` fields. You can now use the ``hidden``
+  mode for widgets which should get rendered as ``<input type="hidden"
+  />``.
+
+  Note: Make sure you use the new formui templates which will avoid rendering
+        labels for hidden widgets or adjust your custom form macros.
+
+- Feature: Added ``missing_value`` support to data/time converters
+
+- Feature: Added named vocabulary lookup in ``ChoiceTerms`` and
+  ``CollectionTerms``.
+
+- Implemented support for ``FileUpload`` in ``FileWidget``.
+
+  * Added helper for handling ``FileUpload`` widgets:
+
+    + ``extractContentType(form, id)
+
+      Extracts the content type if ``IBytes``/``IFileWidget`` was used.
+
+    + ``extractFileName(form, id, cleanup=True, allowEmtpyPostFix=False)``
+
+      Extracts a filename if ``IBytes``/``IFileWidget`` was used.
+
+      Uploads from win/IE need some cleanup because the filename includes also
+      the path. The option ``cleanup=True`` will do this for you. The option
+      ``allowEmtpyPostFix`` allows you to pass a filename without
+      extensions. By default this option is set to ``False`` and will raise a
+      ``ValueError`` if a filename doesn't contain an extension.
+
+  * Created afile upload data converter registered for
+    ``IBytes``/``IFileWidget`` ensuring that the converter will only be used
+    for fiel widgets. The file widget is now the default for the bytes
+    field. If you need to use a text area widget for ``IBytes``, you have to
+    register a custom widget in the form using::
+
+      fields['foobar'].widgetFactory = TextWidget
+
 - Feature: Originally, when an attribute access failed in Unauthorized or
   ForbiddenAttribute exceptions, they were ignored as if the attribute would
   have no value. Now those errors are propagated and the system will fail
@@ -66,12 +107,17 @@
 - Bug: When fields only had a vocabulary name, the choice terms adaptation
   would fail, since the field was not bound. This has now been corrected.
 
+- Documentation: Integrated English language and content review improvements
+  by Roy Mathew in ``form.txt``.
+
+
 Version 1.2.0 (5/30/2007)
 -------------------------
 
 - Feature: Added ability to change the button action title using an ``IValue``
   adapter.
 
+
 Version 1.1.0 (5/30/2007)
 -------------------------
 

Copied: z3c.form/trunk/TODOS.txt (from rev 76940, z3c.form/trunk/src/z3c/form/TODO.txt)
===================================================================
--- z3c.form/trunk/TODOS.txt	                        (rev 0)
+++ z3c.form/trunk/TODOS.txt	2007-06-22 16:43:46 UTC (rev 76941)
@@ -0,0 +1,36 @@
+=====
+TODOS
+=====
+
+Framework
+---------
+
+- There is only a hidden widget template registered for ``ITextWidget``. We
+  have to define more hidden widgets for sequence etc.
+
+
+
+Documentation
+-------------
+
+
+Samples
+-------
+
+Write some samples to show the power of the new widget and form framework.
+
+- Object name as an additional field in an add form
+
+
+Improvements
+------------
+
+Add explicit difference between error and confirmation message e.g.
+"There were some errors." and "No changes were applied."
+
+
+Notes from Roger
+----------------
+
+- Define all widget attributes for the different widgets in the interfaces 
+  as fields

Modified: z3c.form/trunk/setup.py
===================================================================
--- z3c.form/trunk/setup.py	2007-06-22 16:13:33 UTC (rev 76940)
+++ z3c.form/trunk/setup.py	2007-06-22 16:43:46 UTC (rev 76941)
@@ -38,6 +38,16 @@
                  'term.txt',
                  'util.txt')])
 
+print (
+        read('README.txt')
+        + '\n\n' +
+        'Detailed Documentation\n'
+        '**********************\n'
+        + '\n' + chapters +
+        + '\n\n' +
+        read('CHANGES.txt')
+        )
+
 setup (
     name='z3c.form',
     version='1.3.0',
@@ -46,10 +56,12 @@
     description = "An advanced form and widget framework for Zope 3",
     long_description=(
         read('README.txt')
-        + '\n' +
+        + '\n\n' +
         'Detailed Documentation\n'
         '**********************\n'
-        + '\n' + chapters
+        + '\n' + chapters +
+        + '\n\n' +
+        read('CHANGES.txt')
         ),
     license = "ZPL 2.1",
     keywords = "zope3 form widget",

Deleted: z3c.form/trunk/src/z3c/form/CHANGES.txt
===================================================================
--- z3c.form/trunk/src/z3c/form/CHANGES.txt	2007-06-22 16:13:33 UTC (rev 76940)
+++ z3c.form/trunk/src/z3c/form/CHANGES.txt	2007-06-22 16:43:46 UTC (rev 76941)
@@ -1,44 +0,0 @@
-=======
-CHANGES
-=======
-
-- Added support for ``hidden`` fields. You can now use the ``hidden`` mode
-  for widgets which should get rendered as <input type="hidden" />. Note;
-  There is only a hidden widget template registered for ITextWidget. We have to
-  define more hidden widgets for sequence etc. Also make sure you use the new 
-  formui templates which will avoid rendering labels for hidden widgets or
-  adjust your custom form macros.
-
-- Added missing_value support to data/time converters
-
-- Changed registration of file upload data converter. Register 
-  FileUploadDataConverter for IBytes/IFileWidget. This will force to use the 
-  data converter only for IFileWidget and not for IBytes at all. IBytes/IWidget
-  uses by default the FieldDataConverter.
-
-  What does this mean:
-  If you need to use a text area widget for IBytes, you have to register a 
-  custom widget in the form because the default widget for IBytes is a file 
-  upload widget. You can do this by simply set:
-
-  ``fields['foobar'].widgetFactory = TextWidget``
-
-- Fix extractFileName method, now it doesn't remove dots from a filename
-  Added a couple tests for extractFileName
-
-- Added named vocabulary lookup in ChoiceTerms and CollectionTerms
-
-- Implemented support for FileUpload in FileWidget
-
-- Added helper for handling FileUpload. You can find this helpers in 
-  z3c.form.util:
-  
-  def extractContentType(form, id):
-      """Knows how to extract a filename if a IBytes/IFileWidget was used."""
-
-  def extractFileName(form, id, cleanup=True):
-      """Knows how to extract a filename if a IBytes/IFileWidget was used.
-
-      Uploads from win/IE need some cleanup because the filename includes also 
-      the path. cleanUp=True will do this for you.
-      """

Deleted: z3c.form/trunk/src/z3c/form/TODO.txt
===================================================================
--- z3c.form/trunk/src/z3c/form/TODO.txt	2007-06-22 16:13:33 UTC (rev 76940)
+++ z3c.form/trunk/src/z3c/form/TODO.txt	2007-06-22 16:43:46 UTC (rev 76941)
@@ -1,31 +0,0 @@
-====
-TODO
-====
-
-Framework
----------
-
-Documentation
--------------
-
-
-Samples
--------
-
-Write some samples to show the power of the new widget and form framework.
-
-- Object name as an additional field in an add form
-
-
-Improvements
-------------
-
-Add explicit difference between error and confirmation message e.g.
-"There were some errors." and "No changes were applied."
-
-
-Notes from Roger
-----------------
-
-- Define all widget attributes for the different widgets in the interfaces 
-  as fields

Modified: z3c.form/trunk/src/z3c/form/util.py
===================================================================
--- z3c.form/trunk/src/z3c/form/util.py	2007-06-22 16:13:33 UTC (rev 76940)
+++ z3c.form/trunk/src/z3c/form/util.py	2007-06-22 16:43:46 UTC (rev 76941)
@@ -89,11 +89,11 @@
 
 def extractFileName(form, id, cleanup=True, allowEmtpyPostFix=False):
     """Knows how to extract a filename if a IBytes/IFileWidget was used.
-    
-    Uploads from win/IE need some cleanup because the filename includes also 
-    the path. The option cleanup=True will do this for you. The option 
+
+    Uploads from win/IE need some cleanup because the filename includes also
+    the path. The option cleanup=True will do this for you. The option
     allowEmtpyPostFix allows to pass filename without extensions. By default
-    this option is set to False and will raise a ValueError if a filename 
+    this option is set to False and will raise a ValueError if a filename
     doesn't contain a extension.
     """
     widget = getWidgetById(form, id)



More information about the Checkins mailing list