[Zope3-Users] Question/Problem with UserPreferences
Florian Lindner
mailinglists at xgm.de
Thu Jun 9 12:44:16 EDT 2005
Hello,
I try to use the User Preference API.
I've defined a Interface:
class IUserSettings(Interface):
email = TextLine(
title = u"E-mail Address")
and registered it in my configure.zcml:
<preferenceGroup
id="UserSettings"
title="Basic User Settings"
schema=".interfaces.IUserSettings"
/>
First question: What happens if two configure.zcml files register a preference
group with the same name?
When I go to http://localhost:8080/++preferences++ I see a page which - amoung
others - displays my preferencce group.
http://localhost:8080/++preferences++/UserSettings displays only my group.
I try to use the value of email in a ZPT:
E-Mail: <span tal:replace="++preferences++/UserSettings/email" />
or
E-Mail: <span tal:replace="++preferences++UserSettings/email" />
both give this traceback:
PTRuntimeError: ['Compilation failed', 'zope.tal.taldefs.TALError: Invalid
variable name "email" in expression \'++preferences++UserSettings/email\', at
line 6, column 15']
What is wrong there?
Thanks,
Florian
More information about the Zope3-users
mailing list