def post_api(self, module, *args):
print args # will always be ()
The idea is that if I call site/api/machine/my_machine/delete then module is 'machine', and args should be ('my_machine', 'delete').
On another note, perhaps *kwargs could be integrated as well, using params.
(e.g. for site/api/action?key1=val1&key2=val2 then kwargs will be {'key1': 'val1', 'key2': 'val2'})
The idea is that if I call
site/api/machine/my_machine/deletethenmoduleis'machine', andargsshould be('my_machine', 'delete').On another note, perhaps
*kwargscould be integrated as well, usingparams.(e.g. for
site/api/action?key1=val1&key2=val2thenkwargswill be{'key1': 'val1', 'key2': 'val2'})