Changeset 424 in products
- Timestamp:
- Jul 27, 2006 1:33:52 PM (18 years ago)
- Location:
- qTopic/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
qTopic/trunk/__init__.py
r75 r424 1 1 from Products.Archetypes.public import process_types, listTypes 2 2 from Products.CMFCore import utils 3 from AccessControl import allow_module 3 4 from Products.CMFCore.DirectoryView import registerDirectory, registerFileExtension 4 5 … … 7 8 8 9 registerDirectory(SKINS_DIR, GLOBALS) 10 allow_module('Products.qTopic.utils') 9 11 10 12 def initialize(context): -
qTopic/trunk/skins/qtopic/export_csv.py
r392 r424 13 13 res = context.queryCatalog() 14 14 fields = fields or context.getCustomViewFields() 15 16 if hasattr(context, 'getDelimiter'): 17 delimiter = context.getDelimiter() or ';' 18 else: 19 delimiter = ',' 20 21 if hasattr(context, 'getShowHeader'): 22 if show_header and context.getShowHeader(): 23 print delimiter.join(fields) 24 else: 25 if show_header: 26 print delimiter.join(fields) 27 28 15 csv_data = [] 29 16 for r in res: 30 print delimiter.join([test(getattr(r, f, ''),getattr(r, f, ''),'') for f in fields])31 return printed17 csv_data.append(dict([(f, getattr(r, f, ''))for f in fields])) 18 return context.toCSV(fields, csv_data)
Note: See TracChangeset
for help on using the changeset viewer.