equal
deleted
inserted
replaced
19 |
19 |
20 __docformat__ = "restructuredtext en" |
20 __docformat__ = "restructuredtext en" |
21 _ = unicode |
21 _ = unicode |
22 |
22 |
23 from cubicweb.schema import display_name |
23 from cubicweb.schema import display_name |
24 from cubicweb.predicates import any_rset |
24 from cubicweb.predicates import any_rset, empty_rset |
25 from cubicweb.uilib import UnicodeCSVWriter |
25 from cubicweb.uilib import UnicodeCSVWriter |
26 from cubicweb.view import EntityView, AnyRsetView |
26 from cubicweb.view import EntityView, AnyRsetView |
27 |
27 |
28 class CSVMixIn(object): |
28 class CSVMixIn(object): |
29 """mixin class for CSV views""" |
29 """mixin class for CSV views""" |
78 the generated CSV file will have a table per entity type found in the |
78 the generated CSV file will have a table per entity type found in the |
79 resultset. ('table' here only means empty lines separation between table |
79 resultset. ('table' here only means empty lines separation between table |
80 contents) |
80 contents) |
81 """ |
81 """ |
82 __regid__ = 'ecsvexport' |
82 __regid__ = 'ecsvexport' |
83 __select__ = any_rset() |
83 __select__ = EntityView.__select__ | empty_rset() |
84 title = _('csv export (entities)') |
84 title = _('csv export (entities)') |
85 |
85 |
86 def call(self): |
86 def call(self): |
87 req = self._cw |
87 req = self._cw |
88 rows_by_type = {} |
88 rows_by_type = {} |