Changeset 138:3c52f2708104

Show
Ignore:
Timestamp:
09/24/09 06:48:03 (10 months ago)
Author:
Ga?tan de Menten <ged@…>
Branch:
default
Message:

Quick fix for demo_repository to be coherent with the new API of by_id, which
now returns a 3-tuple instead of a pair. Should be fixed further IMO. See
ticket #18.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • examples/demo_repository.py

    r112 r138  
    1717if __name__ == '__main__': 
    1818    # Add a chart to the invoice 
    19     inv['chart'] = repository.by_id(Invoice, 'pie') 
     19    inv['chart'] = repository.by_id(Invoice, 'pie')[:2] 
    2020 
    2121    # Generate all reports on the invoice class 
     
    2626        filename = 'output_%s%s' % (report_name, ext) 
    2727        print "generating '%s'..." % filename, 
    28         report, mimetype = repository.by_id(Invoice, report_name) 
     28        report, mimetype, desc = repository.by_id(Invoice, report_name) 
    2929        data = report(o=inv).render().getvalue() 
    3030        file(filename, 'wb').write(data)