[Grok-doc] grok poller tutorial

Sebastian Ware sebastian at urbantalk.se
Tue Nov 17 11:14:55 EST 2009


I have added a note on this:

   NOTE: When adding the application in the Grok Admin UI, we call it  
"poller" which is the application name used later in this tutorial.

I have granted you manager rights. I think that should make it  
possible for you to edit any community docs.

I changed the chooseName typo (called them "obj" everywhere since  
"object" is a reserved word).

The doc is in Plone, I don't think it will play well with a SVN-repo,  
one would have to recreate it every time one makes an update. But you  
should be able to edit it now.

Mvh Sebastian


17 nov 2009 kl. 16.45 skrev Steve Schmechel:

> --- On Tue, 11/17/09, Sebastian Ware <sebastian at urbantalk.se> wrote:
>
>> From: Sebastian Ware <sebastian at urbantalk.se>
>> Subject: Re: [Grok-doc] grok poller tutorial
>> To: "Steve Schmechel" <steveschmechel at yahoo.com>
>> Cc: grok-doc at zope.org
>> Date: Tuesday, November 17, 2009, 8:06 AM
>> 17 nov 2009 kl. 14.33 skrev Steve
>> Schmechel:
>>
>>> Nice tutorial, but there are a few items that will
>> frustrate new
>>> users trying to make the tutorial run.
>>>
>>> - No mention of using the Grok Admin UI to add an
>> instance of the app
>>> called "poller", but it is assumed to be done.
>>
>> Reference to the Official Grok Tutorial where it is
>> explained. A newbie will have to read that tutorial to
>> install Grok.
>
> True, and you can name it anything you want.
> But the example code in part 5, has you doing:
>>>> poller = root['poller']
> Which means that you must either name it "poller"
> or change the text to:
>>>> poller = root['<name of your instance here>']
>
>>
>>>
>>> - An import uses from "zope.persistent.dict" but
>> should be "persistent.dict", at least for me (Clean
>> virtualenv w/ python 2.5 on Linux).
>>
>> Fixed
>>
>>>
>>> - The intermediate state using grok.Fields manually
>> instead of the later use of interfaces, throws an
>> exception.
>>
>> Shouldn't that work? Anyway, do you have time to change
>> this and add a short explanation (two or three sentences)?
>
> I would change it, but I still have no permissions to change
> anything except my own tutorial.
> (Yes, I've asked several times, but the permissions have never  
> changed.)
>
>>
>>>
>>> - For the name chooser code,  "Choosename(name.
>> obj)", should be "Choosename(name, object)".
>>
>> Can't find this typo. Maybe you fixed it.
>
> Part 11: Implementing the Name Chooser
> The first code block:
>
>    def chooseName(self, name, object):
>        # At first choose a name by using Zopes default NameChooser
>        name = super(PollerNameChooser, self).chooseName(name, obj)   
> <----
>
>        # Lower case the result and replace spaces with underscores
>        name = name.replace(u' ', u'_').lower()
>
>        # Check the name for errors just to be careful
>        self.checkName(name, object)
>        return name
>
>
>>
>>>
>>> - Several of the required additions to "imports" along
>> the way are not mentioned, so you have to do a lot of
>> reading the errors and adding them.
>>> (You can work through this, but it gets tedious.)
>>
>> If someone fixes this, please let me know.
>
> Could we create a working copy of this and put it in the Zope
> Subversion repository under "grokapps"?  Are those apps being
> tested in any way with new releases?
> (Before you ask, no, I don't have Zope check-in privileges.)
>
>
>



More information about the grok-doc mailing list