I'd like to share that I just use TurboEntity to follow the simpleblog
tutorial
http://www.splee.co.uk/2006/10/14/simpleblog-part-1/
The result looks so great. Take a look at the code:
# Model.py:
from turboentity import *
from docutils.core import publish_parts
class Post(Entity):
title = Column(Unicode(50))
content = Column(Unicode)
post_date = Column(DateTime, default=datetime.now())
is_published = Column(Boolean, default=False)
@property
def html_content(self):
return
publish_parts(self.content,writer_name="html")["html_body"]
# and other parts are the same in the tutorial
--
Fred
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---