Первоначально начал смотреть примеры и на основании примеров делать похожее.
Но так ни один пример не заработал… видимо делаю не совсем понимая.
Последний пример сделал следующим образом (уже много чего наменял - возможно уже совсем неправильно):
### interfaces.py ####
import zope.interface
import re
from zope.schema import Text, TextLine
class IAbonentData(zope.interface.Interface):
ul = TextLine(title=(u"Улица"))
dom = TextLine(title=(u"Дом"))
kv = TextLine(title=(u"Квартира"))
ls = TextLine(title=(u"Лицевой счет"))
def name():
""" дплдеплпрлд
оаоароапоарпо
"""
### GetAbonentData.py ####
coding:utf-8
import psycopg
import zope
from abonent.interfaces import IAbonentData
class GetAbonent(persistent.interfaces.IPersistent):
zope.interface.implements(IAbonentData)
def __init__(self, ul='', dom='', kv='', ls=''):
self.ul = ul
self.dom = dom
self.kv = kv
self.ls = ls
def name(self):pass
<html metal:use-macro=“context/@@standard_maros/page” i18n:domain=.GetAbonentData.>
<body>
<div metal:fill-slot=“body”>
<table>
<caption>Получение данных абонента</caption>
<tr>
<td>Улица</td>
<td tal:replace=“context/ul”>Дом</td>
</tr>
<tr>
<td>Дом</td>
<td tal:replace=“context/dom”>Дом</td>
</tr>
<tr>
<td>Квартира</td>
<td tal:replace=“context/kv”>Квартира</td>
</tr>
<tr>
<td>Лицевой счет</td>
<td tal:replace=“context/ls”>Лицевой счет</td>
</tr>
</table>
</div>
</body>
</html>
#### configure.zcml ####
<configure
xmlns="http://namespaces.zope.org/zope“
xmlns:browser=”http://namespaces.zope.org/browser“
xmlns:i18n=”http://namespaces.zope.org/i18n“
i18n_domain=”GetAbonentData“
>
<content class=”.GetAbonentData.GetAbonent“>
<implements interface=”zope.app.annotation.IAttributeAnnotatable“>
<require permission=”zope.View“ interface=”.interfaces.IAbonentData“ />
<require permission=”zope.ManageContent“ set_schema=”.interfaces.IAbonentData“ />
</content>
<browser:addMenuItem
class=”.GetAbonentData.AbonentData“
title=”GetAbonentXMLData“
permission=”zope.ManageContent“
view=”Abonent.html“
/>
<browser:getform
schema=”.interfaces.IAbonentData“
label=”kdfjdkfjjfgkjkgj“
content_factory=”.GetAbonentData.GetAbonent“
arguments=”ul dom kv ls“
name=”Abonent.html“
permission=”zope.ManageContent“
/>
<include package=”.browser" />
</configure>