문제

Does anybody know any good examples of Dexterity-based Contenttypes, without use of Grok?

... just for learning purposes

도움이 되었습니까?

해결책

Grok is kind of just a convenience wrapper around the ZCA. Your types can just be changed to use ZCML or just plain zope. For example, the following:

class View(grok.View):
    grok.context(IProgram)
    grok.require('zope2.View')

This would just convert to the following in ZCML:

<browser:page
    name="view"
    for="IProgram"
    permission="zope2.View"
    class=".yourviewmodule.View"
    template=".yourtemplate.pt"
    />
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top