[Checkins] SVN: z3c.table/trunk/ Fixed tests, so they no longer use ``zope.app.container`` (which was even not declared as test dependency).
Michael Howitz
mh at gocept.com
Tue Dec 29 04:25:37 EST 2009
Log message for revision 107239:
Fixed tests, so they no longer use ``zope.app.container`` (which was even not declared as test dependency).
Changed:
U z3c.table/trunk/CHANGES.txt
U z3c.table/trunk/src/z3c/table/README.txt
U z3c.table/trunk/src/z3c/table/column.txt
-=-
Modified: z3c.table/trunk/CHANGES.txt
===================================================================
--- z3c.table/trunk/CHANGES.txt 2009-12-29 00:08:04 UTC (rev 107238)
+++ z3c.table/trunk/CHANGES.txt 2009-12-29 09:25:36 UTC (rev 107239)
@@ -5,9 +5,13 @@
Version 0.6.2dev (unreleased)
-----------------------------
-- Allow to initialze the column definitions without requiring an entire table update.
+- Allow to initialze the column definitions without requiring an
+ entire table update.
+- Fixed tests, so they no longer use ``zope.app.container`` (which was
+ even not declared as test dependency).
+
Version 0.6.1 (2009-02-22)
--------------------------
@@ -28,7 +32,7 @@
- Moved advanced batching implementation into z3c.batching
-- Implemented GetAttrFormatterColumn. This column can be used for simple
+- Implemented GetAttrFormatterColumn. This column can be used for simple
value formatting columns.
- Bad typo in columns.py: Renamed ``getLinkConent`` to ``getLinkContent``
@@ -41,7 +45,7 @@
- Fix CheckBoxColumn, use always the correct selectedItems. Use always real
selectedItems form the table
-- Fix RadioColumn, use always the correct selectedItem from the selectedItems
+- Fix RadioColumn, use always the correct selectedItem from the selectedItems
list. Use always the first selectedItems form the tables selectedItems
Modified: z3c.table/trunk/src/z3c/table/README.txt
===================================================================
--- z3c.table/trunk/src/z3c/table/README.txt 2009-12-29 00:08:04 UTC (rev 107238)
+++ z3c.table/trunk/src/z3c/table/README.txt 2009-12-29 09:25:36 UTC (rev 107239)
@@ -41,7 +41,7 @@
Let's create a sample container which we can use as our iterable context:
- >>> from zope.app.container import btree
+ >>> from zope.container import btree
>>> class Container(btree.BTreeContainer):
... """Sample container."""
... __name__ = u'container'
@@ -758,7 +758,6 @@
section ``BatchProvider`` below for more infos about batch rendering:
>>> from zope.configuration.xmlconfig import XMLConfig
- >>> import zope.app.component
>>> import z3c.table
>>> XMLConfig('meta.zcml', zope.component)()
>>> XMLConfig('configure.zcml', z3c.table)()
@@ -1742,11 +1741,11 @@
>>> simpleTable.render()
u''
-Since we have registered 3 adapters for IColumn on None (IOW on an empty mapping),
+Since we have registered 3 adapters for IColumn on None (IOW on an empty mapping),
initializing rows definitions for the empty table will initiliaze the columns attribute list
>>> simpleTable.columns
-
+
>>> simpleTable.initColumns()
>>> simpleTable.columns
[<CorrectColspanColumn u'colspanColumn'>, <NameColumn u'secondColumn'>, <TitleColumn u'firstColumn'>]
Modified: z3c.table/trunk/src/z3c/table/column.txt
===================================================================
--- z3c.table/trunk/src/z3c/table/column.txt 2009-12-29 00:08:04 UTC (rev 107238)
+++ z3c.table/trunk/src/z3c/table/column.txt 2009-12-29 09:25:36 UTC (rev 107239)
@@ -3,7 +3,7 @@
=============
Let's show the different columns we offer by default. But first take a look at
-the README.txt which explains the Table and Column concepts.
+the README.txt which explains the Table and Column concepts.
Sample data setup
@@ -11,7 +11,7 @@
Let's create a sample container that we can use as our iterable context:
- >>> from zope.app.container import btree
+ >>> from zope.container import btree
>>> class Container(btree.BTreeContainer):
... """Sample container."""
>>> container = Container()
@@ -37,13 +37,13 @@
>>> from z3c.table import column
>>> class NumberColumn(column.Column):
- ...
+ ...
... header = u'Number'
... weight = 20
- ...
+ ...
... def getSortKey(self, item):
... return item.number
- ...
+ ...
... def renderCell(self, item):
... return 'number: %s' % item.number
@@ -55,7 +55,7 @@
>>> from z3c.table import table
>>> class NameTable(table.Table):
- ...
+ ...
... def setUpColumns(self):
... return [
... column.addColumn(self, column.NameColumn, u'name',
@@ -110,7 +110,7 @@
Let's define a table using the RadioColumn:
>>> class RadioTable(table.Table):
- ...
+ ...
... def setUpColumns(self):
... return [
... column.addColumn(self, column.RadioColumn, u'radioColumn',
@@ -201,7 +201,7 @@
Let's define a table using the RadioColumn:
>>> class CheckBoxTable(table.Table):
- ...
+ ...
... def setUpColumns(self):
... return [
... column.addColumn(self, column.CheckBoxColumn, u'checkBoxColumn',
@@ -248,7 +248,7 @@
</tbody>
</table>
-And again you can set force to render the checkbox input field as selected with
+And again you can set force to render the checkbox input field as selected with
a given request value:
>>> checkBoxRequest = TestRequest(form={'table-checkBoxColumn-0-selectedItems':
@@ -376,14 +376,14 @@
Let's define a table using the CreatedColumn:
>>> class CreatedColumnTable(table.Table):
- ...
+ ...
... def setUpColumns(self):
... return [
... column.addColumn(self, column.CreatedColumn, u'createdColumn',
... weight=1),
... ]
-Now create, update and render our table. Note, we use a Dublin Core stub
+Now create, update and render our table. Note, we use a Dublin Core stub
adapter which only returns ``01/01/01 01:01`` as created date:
>>> request = TestRequest()
@@ -422,14 +422,14 @@
Let's define a table using the CreatedColumn:
>>> class ModifiedColumnTable(table.Table):
- ...
+ ...
... def setUpColumns(self):
... return [
... column.addColumn(self, column.ModifiedColumn,
... u'modifiedColumn', weight=1),
... ]
-Now create, update and render our table. Note, we use a Dublin Core stub
+Now create, update and render our table. Note, we use a Dublin Core stub
adapter which only returns ``02/02/02 02:02`` as modified date:
>>> request = TestRequest()
@@ -465,21 +465,21 @@
GetAttrColumn
-------------
-The ``GetAttrColumn`` column is a mixin which is used in ``CreatedColumn`` and
-in ``ModifiedColumn``. Not all code get used if everything is fine. So let's
+The ``GetAttrColumn`` column is a mixin which is used in ``CreatedColumn`` and
+in ``ModifiedColumn``. Not all code get used if everything is fine. So let's
test the column itself and force some usecase:
>>> class GetTitleColumn(column.GetAttrColumn):
- ...
+ ...
... attrName = 'title'
... defaultValue = u'missing'
>>> class GetAttrColumnTable(table.Table):
- ...
+ ...
... attrName = 'title'
... defaultValue = u'missing'
- ...
+ ...
... def setUpColumns(self):
... return [
... column.addColumn(self, GetTitleColumn, u'title'),
@@ -520,15 +520,15 @@
get the default value defined from the ``GetAttrColumnTable``:
>>> class UndefinedAttributeColumn(column.GetAttrColumn):
- ...
+ ...
... attrName = 'undefined'
... defaultValue = u'missing'
>>> class GetAttrColumnTable(table.Table):
- ...
+ ...
... attrName = 'title'
... defaultValue = u'missing'
- ...
+ ...
... def setUpColumns(self):
... return [
... column.addColumn(self, UndefinedAttributeColumn, u'missing'),
@@ -569,7 +569,7 @@
``defaultValue``:
>>> class BadAttributeColumn(column.GetAttrColumn):
- ...
+ ...
... defaultValue = u'missing'
>>> firstItem = container[u'first']
@@ -584,7 +584,7 @@
>>> from zope.security.interfaces import Unauthorized
>>> class ProtectedItem(object):
- ...
+ ...
... @property
... def forbidden(self):
... raise Unauthorized, 'forbidden'
@@ -600,7 +600,7 @@
Now define a column:
>>> class ForbiddenAttributeColumn(column.GetAttrColumn):
- ...
+ ...
... attrName = 'forbidden'
... defaultValue = u'missing'
@@ -615,18 +615,18 @@
GetAttrFormatterColumn
----------------------
-The ``GetAttrFormatterColumn`` column is a get attr column which is able to
+The ``GetAttrFormatterColumn`` column is a get attr column which is able to
format the value. Let's use the Dublin Core adapter for our sample:
>>> from zope.dublincore.interfaces import IZopeDublinCore
>>> class GetCreatedColumn(column.GetAttrFormatterColumn):
- ...
+ ...
... def getValue(self, item):
... dc = IZopeDublinCore(item, None)
... return dc.created
>>> class GetAttrFormatterColumnTable(table.Table):
- ...
+ ...
... def setUpColumns(self):
... return [
... column.addColumn(self, GetCreatedColumn, u'created'),
@@ -668,17 +668,17 @@
We can also change the formatter settings in such a column:
>>> class LongCreatedColumn(column.GetAttrFormatterColumn):
- ...
+ ...
... formatterCategory = u'dateTime'
... formatterLength = u'long'
... formatterCalendar = u'gregorian'
- ...
+ ...
... def getValue(self, item):
... dc = IZopeDublinCore(item, None)
... return dc.created
>>> class LongFormatterColumnTable(table.Table):
- ...
+ ...
... def setUpColumns(self):
... return [
... column.addColumn(self, LongCreatedColumn, u'created'),
@@ -729,7 +729,7 @@
... linkCSS = 'myClass'
>>> class MyLinkTable(table.Table):
- ...
+ ...
... def setUpColumns(self):
... return [
... column.addColumn(self, MyLinkColumns, u'link',
@@ -782,11 +782,11 @@
ContentsLinkColumn
------------------
-There are some predefined link columns available. This one will generate a
+There are some predefined link columns available. This one will generate a
``contents.html`` link for each item:
>>> class ContentsLinkTable(table.Table):
- ...
+ ...
... def setUpColumns(self):
... return [
... column.addColumn(self, column.ContentsLinkColumn, u'link',
@@ -838,7 +838,7 @@
This one will generate a ``index.html`` link for each item:
>>> class IndexLinkTable(table.Table):
- ...
+ ...
... def setUpColumns(self):
... return [
... column.addColumn(self, column.IndexLinkColumn, u'link',
@@ -890,7 +890,7 @@
And this one will generate a ``edit.html`` link for each item:
>>> class EditLinkTable(table.Table):
- ...
+ ...
... def setUpColumns(self):
... return [
... column.addColumn(self, column.EditLinkColumn, u'link',
More information about the checkins
mailing list