lazr-users team mailing list archive
-
lazr-users team
-
Mailing list archive
-
Message #00025
Using lazr.restful with a zope3 app
Hello
I'm trying to setup lazr.restful with a zope3 app, more specifically
z3ext/zojax (http://z3ext.net and <http://z3ext.net/>
http://sourceforge.net/projects/zojax/<https://sourceforge.net/projects/zojax/>
)
Part of my trouble is just plain lack of traversal/publisher/zope3 knowledge
but I did understand some bits from reading the txt files in lazr.resful
package.
So, I noticed that the WSGI app class (wsgi.WSGIApplication) has the
"__iter__" method that seems to be customizing the request and publisher
that takes care of the request. Also, by reading Martjin email (
https://lists.launchpad.net/lazr-users/msg00006.html) it seems that I need
to plug in this customization into my zope app. Is this something I need to
do manually or lazr.restful does it for me when I register a RootResource ?.
If I need to do that, how should I proceed?
I tried a lame test and simply added my service root object into app root
when I accessed localhost:8080/foobar I could get the service root
service = getUtility(IServiceRootResource)
root["foobar"] = service
transaction.commit()
apparently it did not work. I'm not sure how I can test that programatically
as well. Doing a getMultiAdapter((root["foobar"], request), name=??) does
not seem to make much sense as I don't have a view name...
Anyway, i'm clearly lost in the zope3/lazr concepts so some direction is
appreciated
Thanks
Gustavo
Follow ups