I'm trying to integrate lazr.restful into a Zope3 app and I was advised to
created my own publication factory. For that I did
methods="GET POST HEAD DELETE"
Priority is set to 5 as opposed to priority 10 of the standard BROWSER
declaration in zope/app/publication/configure.zcml
methods="GET POST HEAD"
But although the RequestPublicationFactory class say:
"The `priority` is used to define a lookup-order when multiple factories
are registered for the same method and mime-type."
the RequestPublicationFactory.lookup does not really take that into account.
So what I did on line 104 of
from operator import itemgetter
factory_lst = sorted(factory_lst, key=itemgetter('priority'))
Now it works as expected, calling canHandle of my factory and then falling
back to ".requestpublicationfactories.BrowserFactory" for non WS requests.
Is this really a bug or should I be doing something different?
Zope-Dev maillist - Zope-Dev@zope.org
** No cross posts or HTML encoding! **
(Related lists -