Changeset 138:3c52f2708104
- 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:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r112
|
r138
|
|
| 17 | 17 | if __name__ == '__main__': |
| 18 | 18 | # Add a chart to the invoice |
| 19 | | inv['chart'] = repository.by_id(Invoice, 'pie') |
| | 19 | inv['chart'] = repository.by_id(Invoice, 'pie')[:2] |
| 20 | 20 | |
| 21 | 21 | # Generate all reports on the invoice class |
| … |
… |
|
| 26 | 26 | filename = 'output_%s%s' % (report_name, ext) |
| 27 | 27 | print "generating '%s'..." % filename, |
| 28 | | report, mimetype = repository.by_id(Invoice, report_name) |
| | 28 | report, mimetype, desc = repository.by_id(Invoice, report_name) |
| 29 | 29 | data = report(o=inv).render().getvalue() |
| 30 | 30 | file(filename, 'wb').write(data) |