[Grok-dev] extending grok classes (grok.JSON)
Joshua Immanuel
josh at hipro.co.in
Sun Mar 10 07:14:00 UTC 2013
Hello,
How do I add behavior to existing grok classes, especially grok.JSON.
I tried sub-classing like:
class MyJSON(grok.JSON):
def __call__(self):
# do something
return super(MyJSON, self).__call__()
class MyAPI(MyJSON):
def service_a(self):
return {'something' : 'blah'}
martian is complaining about lack of configuration for MyJSON. What is
the right way of doing this?
--
Joshua Immanuel
HiPro IT Solutions Private Limited
http://hipro.co.in
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://mail.zope.org/pipermail/grok-dev/attachments/20130310/ee1a139e/attachment.sig>
More information about the Grok-dev
mailing list