Question

in my browser / configure.zcml I've putted a directive to manage a view with a specific interface and method, in this way:

<browser:page
    for="my.package.interfaces.ICartellaBandidiLavoro"
    name="lavoroautonomo"
    class=".cartellabandiview.cartellabandiView"
    template="cartellabandiview.pt"
    allowed_interface=".cartellabandiview.ICartellabandiView"
    allowed_attributes="rss_bandi"
    permission="zope.Public"
    />

in the cartellabandiview.py I have

[...]
class ICartellabandiView(Interface):
    """ cartellabandi view interface """

def rss_bandi():
    """ rss """

when I start the instance I obtain an error

 raise ConfigurationConflictError(conflicts)
 zope.configuration.config.ConfigurationConflictError: Conflicting configuration actions
 For: ('five:protectName', <class 'Products.Five.metaclass.SimpleViewClass from /Users/vito/repos/my.package/my/package/browser/cartellabandiview.pt'>, u'rss_bandi')

Any suggestions?

Vito

Was it helpful?

Solution

If the code you pasted is right, probably is only an indentation problem. rss_bandi is not a method inside the ICartellaView class. it seems is an external module level function.

As Mathias noted already noted: yes, you only need allowed_interface.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top