[Mpuls-commits] r5630 - base/trunk/mpulsweb/controllers

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Nov 18 23:33:56 CET 2011


Author: bh
Date: 2011-11-18 23:33:42 +0100 (Fri, 18 Nov 2011)
New Revision: 5630

Modified:
   base/trunk/mpulsweb/controllers/case.py
Log:
Avoid loading an instance tree for every page when printing a case.
We can take advantage of the instance_tree parameter of the
get_rendered_page function now and pass the instance tree of the case
object loaded for printing.

Fixes mpuls/issue1072


Modified: base/trunk/mpulsweb/controllers/case.py
===================================================================
--- base/trunk/mpulsweb/controllers/case.py	2011-11-18 22:24:57 UTC (rev 5629)
+++ base/trunk/mpulsweb/controllers/case.py	2011-11-18 22:33:42 UTC (rev 5630)
@@ -541,7 +541,8 @@
                     parent = parent.parent
                 out.extend(reversed(headings))
 
-                out.append(get_rendered_page(item.key))
+                out.append(get_rendered_page(item.key,
+                                             case.get_formed_instance_tree()))
         c.formular = "".join(out)
         session['render_mode'] = render_mode
         session.save()



More information about the Mpuls-commits mailing list