pngtile.application: BaseApplication.render_html(end=...) to place scripts at end of body, after script-src's
authorTero Marttila <terom@paivola.fi>
Sun, 14 Sep 2014 23:17:45 +0300
changeset 139 8eff4a9fdd5e
parent 138 59d61da2b64f
child 140 a3bbecbd31e7
pngtile.application: BaseApplication.render_html(end=...) to place scripts at end of body, after script-src's
pngtile/application.py
--- a/pngtile/application.py	Sun Sep 14 18:04:11 2014 +0300
+++ b/pngtile/application.py	Sun Sep 14 23:17:45 2014 +0300
@@ -93,7 +93,7 @@
     STYLESHEETS = ( )
     SCRIPTS = ( )
 
-    def render_html (self, title, body, stylesheets=None, scripts=None):
+    def render_html (self, title, body, stylesheets=None, scripts=None, end=()):
         if stylesheets is None:
             stylesheets = self.STYLESHEETS
 
@@ -110,7 +110,7 @@
             html.body(
                 *(body + tuple(
                     html.script(src=src) for src in scripts
-                ))
+                ) + end)
             ),
         ])