summaryrefslogtreecommitdiff
path: root/Mailman/htmlformat.py
diff options
context:
space:
mode:
Diffstat (limited to 'Mailman/htmlformat.py')
-rw-r--r--Mailman/htmlformat.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/Mailman/htmlformat.py b/Mailman/htmlformat.py
index 53bfe1240..9e8228d6f 100644
--- a/Mailman/htmlformat.py
+++ b/Mailman/htmlformat.py
@@ -3,7 +3,7 @@
Encapsulate HTML formatting directives in classes that act as containers
for python and, recursively, for nested HTML formatting objects."""
-__version__ = "$Revision: 394 $"
+__version__ = "$Revision: 404 $"
# Eventually could abstract down to HtmlItem, which outputs an arbitrary html
# object given start / end tags, valid options, and a value.
@@ -266,6 +266,15 @@ class Document(Container):
output = output + Container.Format(self, indent)
output = output + '%s</html>\n' % spaces
return output
+
+class HeadlessDocument(Document):
+ """Document without head section, for templates that provide their own."""
+ def Format(self, indent=0, **kw):
+ output = 'Content-type: text/html\n\n'
+ spaces = ' ' * indent
+ output = output + spaces
+ output = output + Container.Format(self, indent)
+ return output
class StdContainer(Container):
def Format(self, indent=0):