common/utils.py
branchtls-sprint
changeset 643 616191014b8b
parent 28 9b7067bfaa15
--- a/common/utils.py	Mon Feb 16 20:40:12 2009 +0100
+++ b/common/utils.py	Mon Feb 16 20:42:30 2009 +0100
@@ -177,7 +177,7 @@
             self.post_inlined_scripts.append(self.js_unload_code)
             self.pagedata_unload = True
 
-    def getvalue(self):
+    def getvalue(self, skiphead=False):
         """reimplement getvalue to provide a consistent (and somewhat browser
         optimzed cf. http://stevesouders.com/cuzillion) order in external
         resources declaration
@@ -209,7 +209,10 @@
             w(u'<script type="text/javascript">\n')
             w(u'\n\n'.join(self.post_inlined_scripts))
             w(u'\n</script>\n')
-        return u'<head>\n%s</head>\n' % super(HTMLHead, self).getvalue()
+        header = super(HTMLHead, self).getvalue()
+        if skiphead:
+            return header
+        return u'<head>\n%s</head>\n' % header
         
 
 class HTMLStream(object):