def status(self): return producers.simple_producer(""" <li>Zope Handler <ul> <li><b>Published Module:</b> %s <li><b>Hits:</b> %s </ul>""" % (self.module_name, self.hits))
def status(self): return producers.simple_producer(""" <li>Zope Handler <ul> <li><b>Published Module:</b> %s <li><b>Hits:</b> %s </ul>""" % (self.module_name, self.hits) )
def push(self, producer, encoding=True): fromEncoding = 'utf8' if encoding and type(producer) is StringType: # since simple_producer will split string, so i give unicode string to it producer = simple_producer(producer.decode(fromEncoding)) # don't do codec when upload a file if encoding and not isinstance(producer, file_producer): producer = encoding_wrapper_producer(producer, fromEncoding) return original_push_with_producer(self, producer)