Re: [Zope3-Users] Updating preferences from ZPT

2005-06-23 Thread Stephan Richter
On Tuesday 14 June 2005 16:29, Florian Lindner wrote:
> Do I need to use a view class?

Of course! You cannot just paste a piece of ZPT and expect everything else to 
work as well. You also have to have a ZPT call that calls an "update" or 
similar method.

> Which attribute do I use to update the preferences?

I don't understand this question. There is a Python API which demonstrates how 
to update preferences. 

> What is the best way to redirect or directly output the template the view 
> class is associated with? 

Like you did; by pointing the action to the current view.

You might want to have a look at zope.app.apidoc.browser to see an example on 
how I wrote a custom preferences edit screen for the apidoc-related settings.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Updating preferences from ZPT

2005-06-18 Thread Florian Lindner
Am Dienstag, 14. Juni 2005 22:29 schrieb Florian Lindner:
> What is the best way to redirect or directly output the template the view 
class is associated with?

Ok, I redo my question. Just this part.

How can I just ouput the template from a view class:

class view:
def __call__(self):
return template

How to do that?

Thanks,

Florian
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Updating preferences from ZPT

2005-06-14 Thread Florian Lindner
Hello,
I want to update user preferences from a ZPT. The user should hit "Update" and 
get redirected to the same page with the updates values.

I've tried a form







This was pasted from the site the preferences package autogenerates. It works 
so far, but changing fields have no effect.

Do I need to use a view class?

Which attribute do I use to update the preferences? What is the best way to 
redirect or directly output the template the view class is associated with?

Thanks,

Florian
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users