Exemplo n.º 1
0
            # This behaviour is deprecated
            if settings.DEBUG:
                print "Use of settings.XMLRPC_GET_TEMPLATE is deprecated " \
                    + "Please update your code to use django_xmlrpc/templates"
            template = settings.XMLRPC_GET_TEMPLATE
        else:
            template = 'xmlrpc_get.html'
        return render_to_response(template, {'methods': method_list})


# Load up any methods that have been registered with the server in settings
if hasattr(settings, 'XMLRPC_METHODS'):
    for path, name in settings.XMLRPC_METHODS:
        # if "path" is actually a function, just add it without fuss
        if callable(path):
            xmlrpcdispatcher.register_function(path, name)
            continue

        # Otherwise we try and find something that we can call
        i = path.rfind('.')
        module, attr = path[:i], path[i + 1:]

        try:
            mod = __import__(module, globals(), locals(), [attr])
        except ImportError, ex:
            raise ImproperlyConfigured, "Error registering XML-RPC method: " \
                + "module %s can't be imported" % module

        try:
            func = getattr(mod, attr)
        except AttributeError:
Exemplo n.º 2
0
            if settings.DEBUG:
                print "Use of settings.XMLRPC_GET_TEMPLATE is deprecated " \
                    + "Please update your code to use django_xmlrpc/templates"
            template = settings.XMLRPC_GET_TEMPLATE
        else:
            template = 'xmlrpc_get.html'
        return render_to_response(template, {'methods': method_list},
                                  context_instance=RequestContext(request))


# Load up any methods that have been registered with the server in settings
if hasattr(settings, 'XMLRPC_METHODS'):
    for path, name in settings.XMLRPC_METHODS:
        # if "path" is actually a function, just add it without fuss
        if callable(path):
            xmlrpcdispatcher.register_function(path, name)
            continue

        # Otherwise we try and find something that we can call
        i = path.rfind('.')
        module, attr = path[:i], path[i + 1:]

        try:
            mod = __import__(module, globals(), locals(), [attr])
        except ImportError, ex:
            raise ImproperlyConfigured("Error registering XML-RPC method: " \
                + "module %s can't be imported" % module)

        try:
            func = getattr(mod, attr)
        except AttributeError:
Exemplo n.º 3
0
            if settings.DEBUG:
                print "Use of settings.XMLRPC_GET_TEMPLATE is deprecated " \
                    + "Please update your code to use django_xmlrpc/templates"
            template = settings.XMLRPC_GET_TEMPLATE
        else:
            template = 'xmlrpc_get.html'
        return render_to_response(template, {'methods': method_list},
                                  context_instance=RequestContext(request))


# Load up any methods that have been registered with the server in settings
if hasattr(settings, 'XMLRPC_METHODS'):
    for path, name in settings.XMLRPC_METHODS:
        # if "path" is actually a function, just add it without fuss
        if callable(path):
            xmlrpcdispatcher.register_function(path, name)
            continue

        # Otherwise we try and find something that we can call
        i = path.rfind('.')
        module, attr = path[:i], path[i + 1:]

        try:
            mod = __import__(module, globals(), locals(), [attr])
        except ImportError, ex:
            raise ImproperlyConfigured("Error registering XML-RPC method: " \
                + "module %s can't be imported" % module)

        try:
            func = getattr(mod, attr)
        except AttributeError:
Exemplo n.º 4
0
            if settings.DEBUG:
                print "Use of settings.XMLRPC_GET_TEMPLATE is deprecated " \
                    + "Please update your code to use django_xmlrpc/templates"
            template = settings.XMLRPC_GET_TEMPLATE
        else:
            template = 'xmlrpc_get.html'
        return render_to_response(template, {'methods': method_list},
                                  context_instance=RequestContext(request))


# Load up any methods that have been registered with the server in settings
if hasattr(settings, 'XMLRPC_METHODS'):
    for path, name in settings.XMLRPC_METHODS:
        # if "path" is actually a function, just add it without fuss
        if callable(path):
            xmlrpcdispatcher.register_function(path, name)
            continue

        # Otherwise we try and find something that we can call
        i = path.rfind('.')
        module, attr = path[:i], path[i+1:]

        try:
            mod = __import__(module, globals(), locals(), [attr])
        except ImportError, ex:
            raise ImproperlyConfigured, "Error registering XML-RPC method: " \
                + "module %s can't be imported" % module

        try:
            func = getattr(mod, attr)
        except AttributeError:
Exemplo n.º 5
0
            if settings.DEBUG:
                print "Use of settings.XMLRPC_GET_TEMPLATE is deprecated " \
                    + "Please update your code to use django_xmlrpc/templates"
            template = settings.XMLRPC_GET_TEMPLATE
        else:
            template = 'xmlrpc_get.html'
        return render_to_response(template, {'methods': method_list},
                                  context_instance=RequestContext(request))


# Load up any methods that have been registered with the server in settings
if hasattr(settings, 'XMLRPC_METHODS'):
    for path, name in settings.XMLRPC_METHODS:
        # if "path" is actually a function, just add it without fuss
        if callable(path):
            xmlrpcdispatcher.register_function(path, name)
            continue

        # Otherwise we try and find something that we can call
        i = path.rfind('.')
        module, attr = path[:i], path[i + 1:]

        try:
            mod = __import__(module, globals(), locals(), [attr])
        except ImportError, ex:
            raise ImproperlyConfigured("Error registering XML-RPC method: " \
                + "module %s can't be imported" % module)

        try:
            func = getattr(mod, attr)
        except AttributeError: