Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5_rtl_support
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Romain Courteaud
erp5_rtl_support
Commits
a6dd6619
Commit
a6dd6619
authored
Mar 26, 2015
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
deferred style: use a generator for the list of report section
This uses much less memory
parent
a3f0dbf7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
bt5/erp5_deferred_style/SkinTemplateItem/portal_skins/erp5_deferred_style_core/Base_report.xml
...tem/portal_skins/erp5_deferred_style_core/Base_report.xml
+3
-2
No files found.
bt5/erp5_deferred_style/SkinTemplateItem/portal_skins/erp5_deferred_style_core/Base_report.xml
View file @
a6dd6619
...
@@ -64,14 +64,14 @@ with portal.Localizer.translationContext(localizer_language):\n
...
@@ -64,14 +64,14 @@ with portal.Localizer.translationContext(localizer_language):\n
\n
\n
report_section_list = [r.getResult() for r in ap.getResultList()]\n
report_section_list = [r.getResult() for r in ap.getResultList()]\n
assert len(report_section_list) == report_section_count\n
assert len(report_section_list) == report_section_count\n
report_section_list.sort(
lambda a, b:cmp(a[0], b[0])
)\n
report_section_list.sort(
key=lambda x: x[0]
)\n
\n
\n
def dummyReportMethod():\n
def dummyReportMethod():\n
return report_section_list\n
return report_section_list\n
\n
\n
report_data = context.restrictedTraverse(form_path).report_view.pt_render(\n
report_data = context.restrictedTraverse(form_path).report_view.pt_render(\n
extra_context=dict(options={\'format\': format},\n
extra_context=dict(options={\'format\': format},\n
rendered_report_item_list=
[r[1].decode(\'zlib\') for r in report_section_list]
,\n
rendered_report_item_list=
(r[1].decode(\'zlib\') for r in report_section_list)
,\n
report_method=dummyReportMethod,\n
report_method=dummyReportMethod,\n
form=portal.restrictedTraverse(form_path)))\n
form=portal.restrictedTraverse(form_path)))\n
\n
\n
...
@@ -82,6 +82,7 @@ with portal.Localizer.translationContext(localizer_language):\n
...
@@ -82,6 +82,7 @@ with portal.Localizer.translationContext(localizer_language):\n
attachment_name = attachment_name[1:]\n
attachment_name = attachment_name[1:]\n
if attachment_name.endswith(\'"\'):\n
if attachment_name.endswith(\'"\'):\n
attachment_name = attachment_name[:-1]\n
attachment_name = attachment_name[:-1]\n
\n
attachment_list = (\n
attachment_list = (\n
{\'mime_type\': (request.RESPONSE.getHeader(\'content-type\') or \'application/octet-stream;\').split(\';\')[0],\n
{\'mime_type\': (request.RESPONSE.getHeader(\'content-type\') or \'application/octet-stream;\').split(\';\')[0],\n
\'content\': \'%s\' % report_data,\n
\'content\': \'%s\' % report_data,\n
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment