Using a decorator for generic html templates

Carlos Ribeiro carribeiro at gmail.com
Wed Sep 15 18:16:12 EDT 2004


Hello all again,

I made a small mistake in my previous post. Please change one line only:

-        return func.__doc__
+         return trim(func.__doc__)

The resulting test run is now correct: 

>>> r = Root()
>>> r.index()
'<html>\n  <body>\n    <h1>Hello World!</h1>\n  </body>\n</html>'

As you can see, I just forgot to call trim() at the right time when
crafting my example. Sorry for the inconvenience.

-- 
Carlos Ribeiro
Consultoria em Projetos
blog: http://rascunhosrotos.blogspot.com
blog: http://pythonnotes.blogspot.com
mail: carribeiro at gmail.com
mail: carribeiro at yahoo.com



More information about the Python-list mailing list