Changeset 87:3813918f9fea

Show
Ignore:
Timestamp:
12/05/08 04:44:31 (20 months ago)
Author:
Nicolas ?vrard <nicoe@…>
Children:
88:058150b4af09, 101:fc5e627d5325
Branch:
default
Message:

Added a column example and fixed renamed trombined in invoice.odt

Location:
examples
Files:
1 added
2 modified

Legend:

Unmodified
Added
Removed
  • examples/demo_odf.py

    r80 r87  
    1111repos.add_report(Invoice, 'application/vnd.oasis.opendocument.presentation', 
    1212                 'presentation.odp', report_name='presentation') 
     13repos.add_report(None, 'application/vnd.oasis.opendocument.text', 
     14                 'columns.odt', report_name='column') 
    1315 
    1416if __name__ == '__main__': 
     
    2931    odp_report, _ = repos.classes[Invoice].ids['presentation'] 
    3032    file('bonham_presentation.odp', 'wb').write(odp_report(o=inv).render().getvalue()) 
     33 
     34    # Columns example 
     35    column_report, _ = repos.classes[None].ids['column'] 
     36    lst = [[], ['i'], ['a', 'b'], [1, 2, 3], ['I', 'II', 'III', 'IV']] 
     37    file('test_columns.odt', 
     38         'wb').write(column_report(lst=lst).render().getvalue())