diff options
author | Neha shah <shan.akshata@gmail.com> | 2012-06-01 18:39:21 +0530 |
---|---|---|
committer | Neha shah <shan.akshata@gmail.com> | 2012-06-01 18:39:21 +0530 |
commit | b376fa58b0b19d760aa0cfcaab6171b0a698c3d3 (patch) | |
tree | e4205977b73a67cea86bd9ca6b158a720792c9c9 /gstudio/xmlrpc | |
parent | 5c5972bf175362fc30d1383b9fa76d94e9f0375b (diff) | |
download | gnowsys-b376fa58b0b19d760aa0cfcaab6171b0a698c3d3.tar.gz |
Get and Set methods updated in XMLRPC
Diffstat (limited to 'gstudio/xmlrpc')
-rw-r--r-- | gstudio/xmlrpc/__init__.py | 1 | ||||
-rw-r--r-- | gstudio/xmlrpc/decorators.py | 2 | ||||
-rw-r--r-- | gstudio/xmlrpc/dispatcher.py | 2 | ||||
-rw-r--r-- | gstudio/xmlrpc/metaweblog.py | 6 | ||||
-rw-r--r-- | gstudio/xmlrpc/views.py | 1 |
5 files changed, 8 insertions, 4 deletions
diff --git a/gstudio/xmlrpc/__init__.py b/gstudio/xmlrpc/__init__.py index beb1e72..318e6d9 100644 --- a/gstudio/xmlrpc/__init__.py +++ b/gstudio/xmlrpc/__init__.py @@ -54,6 +54,7 @@ GSTUDIO_XMLRPC_PINGBACK = [ ('gstudio.xmlrpc.pingback.pingback_extensions_get_pingbacks', 'pingback.extensions.getPingbacks')] +# The tuple has been modified to include entries for get and set functions GSTUDIO_XMLRPC_METAWEBLOG = [ ('gstudio.xmlrpc.metaweblog.get_users_blogs', 'blogger.getUsersBlogs'), diff --git a/gstudio/xmlrpc/decorators.py b/gstudio/xmlrpc/decorators.py index 4218a4f..5d13fea 100644 --- a/gstudio/xmlrpc/decorators.py +++ b/gstudio/xmlrpc/decorators.py @@ -42,7 +42,7 @@ from xmlrpclib import Fault from django.contrib.auth import authenticate from django.utils.translation import gettext as _ - +# This file is needed to run XMLRPC ! # Some constants for your pleasure #XXX: Any standardization? AUTHENTICATION_FAILED_CODE = 81 diff --git a/gstudio/xmlrpc/dispatcher.py b/gstudio/xmlrpc/dispatcher.py index f401457..2829184 100644 --- a/gstudio/xmlrpc/dispatcher.py +++ b/gstudio/xmlrpc/dispatcher.py @@ -37,6 +37,8 @@ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. """ +# This file is needed to run XMLRPC + from inspect import getargspec from SimpleXMLRPCServer import SimpleXMLRPCDispatcher from django.conf import settings diff --git a/gstudio/xmlrpc/metaweblog.py b/gstudio/xmlrpc/metaweblog.py index 600e3dc..4dd1fe1 100644 --- a/gstudio/xmlrpc/metaweblog.py +++ b/gstudio/xmlrpc/metaweblog.py @@ -380,7 +380,7 @@ def new_media_object(blog_id, username, password, media): ContentFile(media['bits'].data)) return {'url': default_storage.url(path)} - +# Get functions start from here @xmlrpc_func(returns='string', args='int') def getNodetype(ssid): """Returns the nodetype of given nid """ @@ -478,7 +478,7 @@ def getAttributeType(subjecttypelist): d[str(s)] = "Node Does not Exist" return d - +# Get all function for getting all nodetypes @xmlrpc_func(returns='struct', args='string') def getAll(nodetype): @@ -658,7 +658,7 @@ def getAllSnapshots(nid) : return "Node Does Not Exist" return n - +# Set functions begin from here @xmlrpc_func(returns='string', args=['struct','string']) def setAttributetype(d,objid) : diff --git a/gstudio/xmlrpc/views.py b/gstudio/xmlrpc/views.py index 1edfa37..0bcd4f0 100644 --- a/gstudio/xmlrpc/views.py +++ b/gstudio/xmlrpc/views.py @@ -157,6 +157,7 @@ if hasattr(settings, 'XMLRPC_METHODS'): + '"%s" is not callable in module %s' % (attr, module)) #xmlrpcdispatcher.register_function(func, name) +# Registration for Gnowsys-studio XMLRPC functions xmlrpcdispatcher.register_function(getNodetype,'getNodetype') xmlrpcdispatcher.register_function(nidExists,'nidExists') xmlrpcdispatcher.register_function(getinfoFromSSID,'getinfoFromSSID') |