Changeset 4160 for waeup/branches


Ignore:
Timestamp:
24 May 2009, 10:11:35 (16 years ago)
Author:
uli
Message:

Update CSVImporter interface.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • waeup/branches/ulif-rewrite/src/waeup/interfaces.py

    r4150 r4160  
    120120    """A CSV exporter for objects.
    121121    """
     122
    122123    def export(obj, filepath=None):
    123124        """Export as CSV.
     
    132133    """A CSV importer for objects.
    133134    """
    134     def doImport(filepath):
     135    datatype = schema.TextLine(
     136        title = u'Data type',
     137        description = u'Type of data supported by this filter.',
     138        required = True,)
     139
     140    def doImport(filepath, clear_old_data=True, overwrite=True):
    135141        """Read data from `filepath` and apply data.
    136142
    137143        It depends on the context, what 'applying data' means here.
     144
     145        If `clear_old_data` is False, old data will be
     146        preserved. Otherwise all old data will get lost.
     147
     148        If `overwrite` is False, any existing entries with similar
     149        keys might be overwritten. This option is ignored, when
     150        `clear_old_data` is set to True.
    138151        """
    139 
     152       
    140153class IUserAccount(IWAeUPObject):
    141154    """A user account.
Note: See TracChangeset for help on using the changeset viewer.