diff options
| author | mailman | 1998-04-10 00:25:16 +0000 |
|---|---|---|
| committer | mailman | 1998-04-10 00:25:16 +0000 |
| commit | 9294453a9968f60b9cc1a81d35374d88b4f30288 (patch) | |
| tree | 6abe5fbce43781c8522fde7a24fa6dddc4e41065 /Mailman/htmlformat.py | |
| parent | 9f83b91c0606d5443b7be23af17c687a3d601861 (diff) | |
| download | mailman-9294453a9968f60b9cc1a81d35374d88b4f30288.tar.gz mailman-9294453a9968f60b9cc1a81d35374d88b4f30288.tar.zst mailman-9294453a9968f60b9cc1a81d35374d88b4f30288.zip | |
Diffstat (limited to 'Mailman/htmlformat.py')
| -rw-r--r-- | Mailman/htmlformat.py | 11 |
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): |
