[Grok-dev] Multiple RESTful Views

Paul Wilson paulalexwilson at gmail.com
Wed Sep 23 18:34:00 EDT 2009


Hi there,

It appears that a REST view doesn't work quite like other views; each
method (GET/POST/PUT/DELETE) is a view itself.

This is a problem for me because i'd like to provide many different
RESTful interfaces for the same content type. Is this pattern
discouraged or is there a workaround that you guys know of?

I cannot seem to do this:

---------------------%<----------------------
class DefaultREST(grok.REST):
    grok.layer(IRestLayer)
    grok.name('default')
    grok.context(IFooContext)

    def GET(self):
        ....

class AlternateREST(grok.REST):
    grok.layer(IRestLayer)
    grok.name('alternate')
    grok.context(IFooContext)

    def GET(self):
       .....

ConfigurationConflictError: Conflicting configuration actions
---------------------%<----------------------

Any hints appreciated!

Regards,
Paul


More information about the Grok-dev mailing list