Changeset 4225 for waeup


Ignore:
Timestamp:
8 Jun 2009, 17:01:00 (16 years ago)
Author:
uli
Message:

Update tests.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • waeup/branches/ulif-rewrite/src/waeup/datacenter.txt

    r4191 r4225  
    142142to import data into instances of MyCSVReceiver:
    143143
     144    >>> from waeup.csvfile.interfaces import ICSVFile
     145    >>> from waeup.interfaces import IWAeUPCSVImporter
    144146    >>> from waeup.utils.importexport import CSVImporter
    145147    >>> class MyCSVImporter(CSVImporter):
    146     ...   grok.context(MyCSVReceiver)
     148    ...   grok.adapts(ICSVFile, MyCSVReceiver)
     149    ...   grok.provides(IWAeUPCSVImporter)
    147150    ...   datatype = u'My Stuff'
    148     ...   column_terms = ['col1']
    149151    ...   def doImport(self, filepath, clear_old_data=True,
    150152    ...                                overwrite=True):
     
    181183-----------------------------
    182184
    183 The examples above look complicated, but this is the price for
     185The examples above looks complicated, but this is the price for
    184186modularity. If you create a new container type, you can define an
    185187importer and it will be used automatically by other components.
Note: See TracChangeset for help on using the changeset viewer.