equal
deleted
inserted
replaced
544 |
544 |
545 if export is not None and export < len(contents): |
545 if export is not None and export < len(contents): |
546 content = contents[export] |
546 content = contents[export] |
547 key_order = content.get('key_order') |
547 key_order = content.get('key_order') |
548 |
548 |
549 data = [i.toDict(key_order) for i in content['data']] |
549 if key_order: |
550 |
550 data = [i.toDict(key_order) for i in content['data']] |
551 if not key_order: |
551 |
552 data = [i.values() for i in data] |
552 filename = "export_%d" % export |
553 |
553 return self.csv(request, data, filename, params, key_order) |
554 filename = "export_%d" % export |
|
555 return self.csv(request, data, filename, params, key_order) |
|
556 |
554 |
557 context = dicts.merge(context, |
555 context = dicts.merge(context, |
558 helper.responses.getUniversalContext(request)) |
556 helper.responses.getUniversalContext(request)) |
559 helper.responses.useJavaScript(context, params['js_uses_all']) |
557 helper.responses.useJavaScript(context, params['js_uses_all']) |
560 context['page_name'] = page_name |
558 context['page_name'] = page_name |