I'm working on a website that has a “Sign up” page which should be callable from anywhere in the site.
I have the following dummy interface and implementation for the “user” product:
Interface:
##
## located in bahmanm/sampleapp/interfaces.py
##
class ISampleAppUser(Interface):
"""
"""
Implementation:
##
## located in bahmanm/sampleapp/implementation/SampleAppUser.py
##
class SampleAppUser:
"""
"""
implements(ISampleAppUser)
# Note that this method is outside of the implementation class.
#
def manage_addSampleAppUser(self, id, title):
# ...
Now, for the moment, let's assume there's a link on the index
page which leads to the following template (Sign up template):
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns="http://xml.zope.org/namespaces/tal">
<head><title>Add a new User</title></head>
<body>
<h2>Add a user instance</h2>
<form action="#" method="POST"
tal:attributes="action python:'manage_addSampleAppUser'">
<p>Id: <input type="text" name="id"/></p>
<p>Title: <input type="text" name="title"/></p>
<input type="submit" value="Add"/>
</form>
</body>
</html>
However I haven't been able to find the right value for action
property of the form
; all I get is a “resource not found”.
Honestly, I believe it's a problem of understanding Zope's mechanisms on my side. I'd really appreciate any hints/clues on where should I go digging for the solution, configure.zcml
or the implementation or the template itself. TIA,