Re: [Zope3-Users] views based on request method (GET, POST, etc.)

2006-09-13 Thread Jan-Wijbrand Kolman

Stephan Richter wrote:

On Tuesday 12 September 2006 07:38, Jan-Wijbrand Kolman wrote:

But I have the feeling this can be done more elegantly. I did notice
something in this direction in zope/app/dav/configure.zcml, but I'm not
sure this actually helps. It could be I overlook something very very
obvious...


you have two choices:

1. Implement HTTP verbs as methods. See the resources implementation. 
zope.app.publisher.browser


2. Register some view having the method name as the view name. See 
SchoolTool's REST implementation, for example, schooltool.person.rest.


Hi Stephan!


The first option would work just fine for me indeed.

Out of curiosity though, I wonder about the second option:

I *think* to understand that for this option to work, 
z.a.publication.http.HTTPublication must be used for handling requests 
(instead of z.a.publication.browser.BrowserRequest), right?


And what publication implementation is used when, is in principle 
configured in zope/app/publication/configure.zcml, right?


But then I loose track of how things are tied together... How can I make 
sure this HTTPublication is used for one or more of the content types in 
my application? Maybe (probably) Schooltool does things different in 
this regard than 'stock' Zope-3?


But its quite possible that I'm asking stupid questions now, because I'm 
not sure I can see the forest through the trees anymore ;)


Anyway, thanks for your help!


regards,
jw

--
Jan-Wijbrand Kolman
software ontwikkelaar, Instituut voor Nederlands Geschiedenis
[EMAIL PROTECTED]
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] views based on request method (GET, POST, etc.)

2006-09-12 Thread Stephan Richter
On Tuesday 12 September 2006 07:38, Jan-Wijbrand Kolman wrote:
 But I have the feeling this can be done more elegantly. I did notice
 something in this direction in zope/app/dav/configure.zcml, but I'm not
 sure this actually helps. It could be I overlook something very very
 obvious...

Hi JW,

you have two choices:

1. Implement HTTP verbs as methods. See the resources implementation. 
zope.app.publisher.browser

2. Register some view having the method name as the view name. See 
SchoolTool's REST implementation, for example, schooltool.person.rest.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users