[Grok-dev] extended the grok evaluation section
sebastian at urbantalk.se
Thu Apr 17 18:42:44 EDT 2008
I was looking at the HelloWorld sample code and I don't think it
teaches the casual observer anything about what their first Grok
application might look like. It is simple to the point of almost being
useless. I would suggest a slightly more elaborate version that allows
for some (although admittedly limited) experimentation at least:
class HelloWorld(grok.Application, grok.Model):
msg = "GROK HELLO WORLD!"
self.randomThoughts = "I can do some stuff in the update method
before the view is rendered."
# The PageTemplate could also be moved to a separate file such as
index = grok.PageTemplate(
<p tal:content="context/msg">Hello world message goes here...</p>
<p tal:content="view/randomThoughts">Random thoughts go here...</p>
17 apr 2008 kl. 21.20 skrev Martijn Faassen:
> Hi there,
> As several people requested (and Peter Bengtsson even blogged about: http://www.peterbe.com/plog/what-i-like-and-dislike-about-grok)
> , I've integrated my reply to Jonathan Ellis into the grok.zope.org
> Editing this text so it's ready for the web took quite a bit of time
> as I have different standards for text on the website than I have
> for email here, but it's there now.
> You can find the new bits in the evaluation section, here:
> Volunteers can help! Especially the 'components' article could be
> updated with a lot of hyperlinks to the components in question.
> Either link to the cheeseshop page if that offers documentation, or
> lacking that, for now directly link to the best doctests in
> If you find problems with the text, please fix the typos and bad
> grammar right away. If you have ideas on how to improve the content,
> let's discuss it here.
> Hopefully now Peter has nothing to dislike about Grok anymore. :)
> Grok-dev mailing list
> Grok-dev at zope.org
More information about the Grok-dev