# -*- coding: iso8859-1 -*- # # Copyright (C) 2006 CSIRO Australia # Copyright (C) 2007 Annodex Association, Inc. # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. # # This software consists of voluntary contributions made by many # individuals. For exact contribution history, see the revision # history and logs. # # Author: Conrad Parker import os class Page (object): def __init__(self, o, title=None): self.o = o self.title_arg = title def content_type(self): return 'text/html; charset=utf-8' def title(self): if (self.title_arg): return self.title_arg try: title = self.o.title() except: title = '' return title def __str__(self): return ''' %s
%s

 

''' % (self.title(), self.o.__str__())