Commits

Dan Carroll committed 35dcdb3

Fix up metaweblog import and template. Force it to load metaweblog.py immediately so that functions get added to xml_rpc service.

Comments (0)

Files changed (3)

mysite/metaweblog/__init__.py

+import metaweblog
+

mysite/metaweblog/templates/xmlrpc_get.html

 {% block content %}
 <h1>XML-RPC Service</h1>
 <h2>You need to invoke this service using an XML-RPC Client.</h2>
+{% comment %}
+<!-- Commented out for security -->
 <h2>The following methods are available:</h2>
-{% for m in methods %}
-  <div class="function">
-	<h3>{{ m.0 }}</h3>
-		<div class="function_desc">
-		<strong>Types of Argument{{ m.1.args|length|pluralize }}: </strong> {{ m.1.args }} <br />
-		<strong>Type of Return: </strong> {{ m.1.returns }} <br />
-		<pre class="function_doc">{{ m.2 }}</pre>
-		</div>
-  </div>
-{% endfor %}
+    {% for m in methods %}
+        <div class="function">
+	    <h3>{{ m.0 }}</h3>
+		    <div class="function_desc">
+		        <strong>Types of Argument{{ m.1.args|length|pluralize }}: </strong> {{ m.1.args }} <br />
+		        <strong>Type of Return: </strong> {{ m.1.returns }} <br />
+		        <pre class="function_doc">{{ m.2 }}</pre>
+		    </div>
+        </div>
+    {% endfor %}
+{% endcomment %}
 {% endblock %}
 
 GOOGLEREADER_SHARED_RSS = deploy.GOOGLEREADER_SHARED_RSS
 GOOGLEREADER_PUBLIC_URL = deploy.GOOGLEREADER_PUBLIC_URL
 
-XMLRPC_METHODS = (
-    # We list methods to be exposed in the form (<method path>, <xml-rpc name>,)
-    ('mysite.metaweblog.metaweblog.get_post', 'test',),
-)
 
-
+# Some special settings to aid development in debug mode
 if DEBUG:
     MIDDLEWARE_CLASSES = (
         'debug_toolbar.middleware.DebugToolbarMiddleware',
         'INTERCEPT_REDIRECTS': False,
     }
 
+    # Match local network IPs to allow access from other machines
     from fnmatch import fnmatch
     class glob_list(list):
         def __contains__(self, key):