[Grok-dev] Using POST request

Andreas Jung lists at zopyx.com
Fri Mar 21 08:49:20 EDT 2008


Hi,

I am currently struggeling a bit with POST requests. I am trying to 
implement support for the 'upload' command of setuptools into 
haufe.eggserver. I have something like:

class eggserver(grok.Application, grok.Model):
.....""" my content class """

class MyPubLayer(grok.IRESTLayer):
    pass

class MyREST2(grok.REST):
    grok.context(eggserver)

    def POST(self):
        import pdb; pdb.set_trace()

class MyPostProtocol(grok.RESTProtocol):
    grok.layer(MyPubLayer)
    grok.name('upload')


Calling setuptools like

python2.4 setup.py sdist upload -r 
http://localhost:8080/++rest++upload/eggs

always produces a 404 response.

Thoughts?

Andreas


-- 
ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany
Web: www.zopyx.com - Email: info at zopyx.com - Phone +49 - 7071 - 793376
Registergericht: Amtsgericht Stuttgart, Handelsregister A 381535
Geschäftsführer/Gesellschafter: ZOPYX Limited, Birmingham, UK
------------------------------------------------------------------------
E-Publishing, Python, Zope & Plone development, Consulting
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/grok-dev/attachments/20080321/c4f01790/attachment.bin


More information about the Grok-dev mailing list