From 98613a76a3ddb585b2d930cbe556eca895f37bfa Mon Sep 17 00:00:00 2001 From: Nikita Karetnikov Date: Sun, 12 Aug 2012 06:33:51 +0400 Subject: New features for show_instance() --- gstudio/xmlrpc/metaweblog.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'gstudio/xmlrpc') diff --git a/gstudio/xmlrpc/metaweblog.py b/gstudio/xmlrpc/metaweblog.py index b583b4a..91d9eda 100644 --- a/gstudio/xmlrpc/metaweblog.py +++ b/gstudio/xmlrpc/metaweblog.py @@ -906,6 +906,20 @@ def show_instance(module=None, instance=None, id=None): instance and id): return instance_checker(gstmodels, instance, "get", id) + if ((module == "objectapp.models" or module == objmodels) and + instance): + res = [] + for i in show_id(objmodels, instance): + res.append(instance_checker(objmodels, instance, "get", i)) + return res + + if ((module == "gstudio.models" or module == gstmodels) and + instance): + res = [] + for i in show_id(gstmodels, instance): + res.append(instance_checker(gstmodels, instance, "get", i)) + return res + if module == None and instance == None and id == None: def show_all(m, index): res = [] -- cgit v1.1