pvl.web.Application: render_html(body=..., extrahead=...)
authorTero Marttila <terom@paivola.fi>
Tue, 14 Jan 2014 23:14:53 +0200
changeset 374 d2426cebb46a
parent 373 6beb06b59ee6
child 375 df3bf49634a1
pvl.web.Application: render_html(body=..., extrahead=...)
pvl/web/application.py
--- a/pvl/web/application.py	Tue Jan 14 21:03:30 2014 +0200
+++ b/pvl/web/application.py	Tue Jan 14 23:14:53 2014 +0200
@@ -143,7 +143,7 @@
 
         raise NotImplementedError()
 
-    def render_html (self) :
+    def render_html (self, body=None, extrahead=None) :
         """
             Render page layout (as <html>).
         """
@@ -158,8 +158,11 @@
                 ),
                 html.style(type='text/css')(self.STYLE) if self.STYLE else None,
                 html.script(type='text/javascript')(self.SCRIPT) if self.SCRIPT else None,
+                extrahead,
         )
-        body = html(self.render())
+        
+        if body is None :
+            body = html(self.render())
 
         if not title :
             raise Exception("%s: no page title!" % (self, ))