diff options
-rw-r--r-- | demo/settings.py | 2 | ||||
-rw-r--r-- | demo/urls.py | 1 | ||||
-rw-r--r-- | gstudio/models.py | 2 | ||||
-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 |
8 files changed, 11 insertions, 6 deletions
diff --git a/demo/settings.py b/demo/settings.py index 505f902..96de64f 100644 --- a/demo/settings.py +++ b/demo/settings.py @@ -159,7 +159,7 @@ INSTALLED_APPS = ( 'django.contrib.messages', 'django.contrib.sites', 'mptt', - # 'reversion', + 'reversion', 'tagging', 'django_xmlrpc', 'grappelli.dashboard', diff --git a/demo/urls.py b/demo/urls.py index 10b115b..ac101e7 100644 --- a/demo/urls.py +++ b/demo/urls.py @@ -92,6 +92,7 @@ urlpatterns = patterns( url(r'^nodetypes/', include('gstudio.urls')), url(r'^objects/', include('objectapp.urls')), url(r'^comments/', include('django.contrib.comments.urls')), + #URL for XMLRPC url(r'^xmlrpc/$', 'gstudio.xmlrpc.views.handle_xmlrpc'), url(r'^i18n/', include('django.conf.urls.i18n')), url(r'^admin/doc/', include('django.contrib.admindocs.urls')), diff --git a/gstudio/models.py b/gstudio/models.py index c9806d8..535aded 100644 --- a/gstudio/models.py +++ b/gstudio/models.py @@ -914,7 +914,7 @@ class Nodetype(Node): this_node = {"_id":str(self.id),"title":self.title,"screen_name":self.title, "url":self.get_absolute_url(),"expanded":"true"} g_json["node_metadata"].append(this_node) - g_json["relset"].append(self.id) + for key in predicate_id.keys(): if nbh[key]: 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') |