[Grok-dev] Where can I ask questions about zeam.form.ztk?

Sebastian Ware sebastian at urbantalk.se
Tue Nov 9 10:00:25 EST 2010


Hi Sylvain!

I am looking at zeam.form.ztk. It looks really promising, but I have some questions. Can I post them here on grok-dev?

The first one is why you do

  content.set(field.identifier, value)

and not

  setattr(content, field.identifier, value)

when you update attributes on an object in the applyData method of EditAction (actions.py:23):

    def applyData(self, form, content, data):
        for field in form.fields:
            value = data.get(field.identifier, _marker)
            if value is NO_VALUE and not field.required:
                value = data.getDefault(field, _marker)
            if value is not _marker:
                content.set(field.identifier, value)

Mvh Sebastian




More information about the Grok-dev mailing list