~erobererunc/sahana-eden/tropo_xforms

« back to all changes in this revision

Viewing changes to modules/s3xrc/s3export.py

  • Committer: Fran Boon
  • Date: 2010-11-26 19:13:03 UTC
  • mfrom: (185.2.848 vita)
  • Revision ID: fran@aidiq.com-20101126191303-uw0f7zabsvss0f3r
merge nursix: link records with interactive CRUD/create; cleanups & fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
373
373
            @param list_fields: fields to include in list views
374
374
 
375
375
            @todo 2.3: PEP-8
 
376
            @todo 2.3: implement audit
376
377
            @todo 2.3: use S3Resource.readable_fields
377
 
            @todo: implement audit
 
378
            @todo 2.3: use separate export_fields instead of list_fields
378
379
 
379
380
        """
380
381
 
431
432
                    style.num_format_str = "M/D/YY h:mm"
432
433
                elif coltype == "time":
433
434
                    style.num_format_str = "h:mm:ss"
434
 
 
435
435
                represent = self.manager.represent(field,
436
436
                                                   record=item,
437
437
                                                   strip_markup=True,
438
438
                                                   xml_escape=True)
439
 
                ## Check for a custom.represent (e.g. for ref fields)
440
 
                #represent = resource._represent(item, field.name)
441
 
                ## Filter out markup from text
442
 
                #if isinstance(represent, basestring) and "<" in represent:
443
 
                    #try:
444
 
                        #markup = etree.XML(represent)
445
 
                        #represent = markup.xpath(".//text()")
446
 
                        #if represent:
447
 
                            #represent = " ".join(represent)
448
 
                    #except etree.XMLSyntaxError:
449
 
                        #pass
450
 
 
451
 
                rowx.write(cell1, str(represent), style)
 
439
                rowx.write(cell1, unicode(represent), style)
452
440
                cell1 += 1
453
441
        book.save(output)
454
442
        output.seek(0)