<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -122,9 +122,12 @@ class ServiceController(BaseController):
     
     @requires_role('admin')
     def appeditform(self,id=0):
-        c.item = App.get(-1,id)
-        if not (c.item.list_public or (c.user and c.user.site_id == c.item.site_id)):
-            c.item = None
+        if id == 0 or id == None or id == '0':
+            c.item = App()
+        else:
+            c.item = App.get(-1,id)
+            if not (c.item.list_public or (c.user and c.user.site_id == c.item.site_id)):
+                c.item = None
         return render('/service/app_edit.html')
     
     @requires_role('admin')
@@ -140,7 +143,7 @@ class ServiceController(BaseController):
         else:
             app = App.get(site.id,id)
         
-        app.slug = slugify(sanitize(request.POST['app_name']))
+        app.slug = sanitize(request.POST['real_permalink2'])
         app.name = sanitize(request.POST['app_name'])
         app.authn = sanitize(request.POST['authn'])
         app.description = sanitize(request.POST['description'])</diff>
      <filename>demisauce/trunk/demisauce/controllers/service.py</filename>
    </modified>
    <modified>
      <diff>@@ -99,51 +99,50 @@ app = '''
             &quot;name&quot;: &quot;demisauce.com&quot;, 
             &quot;list_public&quot; : &quot;1&quot;,
             &quot;slug&quot;: &quot;demisauce&quot;,
-            &quot;url_format&quot;:&quot;{base_url}/api/{format}/{service}/{key}?apikey={api_key}&quot;,
             &quot;base_url&quot;: &quot;http://localhost:4951&quot;, 
-            &quot;authn&quot;: &quot;0&quot;
+            &quot;authn&quot;: &quot;demisauce&quot;
         },{
             &quot;site_id&quot;: &quot;1&quot;,
             &quot;owner_id&quot;: &quot;1&quot;,
             &quot;name&quot;: &quot;demisauce.com alternate api&quot;, 
-            &quot;slug&quot;: &quot;demisauce&quot;,
+            &quot;slug&quot;: &quot;demisaucealt&quot;,
             &quot;base_url&quot;: &quot;http://localhost:4951&quot;, 
-            &quot;authn&quot;: &quot;0&quot;
+            &quot;authn&quot;: &quot;demisauce&quot;
         },{
             &quot;site_id&quot;: &quot;2&quot;,
             &quot;owner_id&quot;: &quot;3&quot;,
             &quot;name&quot;: &quot;djangodemo&quot;, 
             &quot;slug&quot;: &quot;djangodemo&quot;,
             &quot;base_url&quot;: &quot;http://djangodemo.test:8001&quot;, 
-            &quot;authn&quot;: &quot;3&quot;
+            &quot;authn&quot;: &quot;none&quot;
         },{
             &quot;site_id&quot;: &quot;3&quot;,
             &quot;owner_id&quot;: &quot;4&quot;,
             &quot;name&quot;: &quot;phpdemo&quot;, 
             &quot;slug&quot;: &quot;phpdemo&quot;,
             &quot;base_url&quot;: &quot;http://demisauce.test&quot;, 
-            &quot;authn&quot;: &quot;3&quot;
+            &quot;authn&quot;: &quot;none&quot;
         },{
             &quot;site_id&quot;: &quot;1&quot;,
             &quot;owner_id&quot;: &quot;1&quot;,
             &quot;name&quot;: &quot;wordpress&quot;, 
             &quot;slug&quot;: &quot;wordpress&quot;,
-            &quot;base_url&quot;: &quot;http://192.168.125.133/blog/xmlrpc.php&quot;, 
-            &quot;authn&quot;: &quot;3&quot;
+            &quot;base_url&quot;: &quot;http://192.168.0.106/blog/xmlrpc.php&quot;, 
+            &quot;authn&quot;: &quot;xmlrpc&quot;
         },{
             &quot;site_id&quot;: &quot;1&quot;,
             &quot;owner_id&quot;: &quot;1&quot;,
             &quot;name&quot;: &quot;delicious.com&quot;, 
             &quot;slug&quot;: &quot;deliciouscom&quot;,
             &quot;base_url&quot;: &quot;http://delicious.com&quot;, 
-            &quot;authn&quot;: &quot;3&quot;
+            &quot;authn&quot;: &quot;none&quot;
         },{
             &quot;site_id&quot;: &quot;1&quot;,
             &quot;owner_id&quot;: &quot;1&quot;,
             &quot;name&quot;: &quot;delicious feeds&quot;, 
             &quot;slug&quot;: &quot;deliciousfeeds&quot;,
             &quot;base_url&quot;: &quot;http://feeds.delicious.com&quot;, 
-            &quot;authn&quot;: &quot;3&quot;
+            &quot;authn&quot;: &quot;none&quot;
         }]
 }'''
 
@@ -157,6 +156,7 @@ service = '''
             &quot;owner_id&quot;: &quot;1&quot;,
             &quot;list_public&quot;: &quot;1&quot;,
             &quot;name&quot;: &quot;Poll Html Service&quot;, 
+            &quot;method_url&quot;: &quot;/api/{format}/poll/{key}?apikey={api_key}&quot;, 
             &quot;key&quot;: &quot;poll&quot;,
             &quot;views&quot;: &quot;&quot;,
             &quot;description&quot;: &quot;Simple Polls, embeddable within your application&quot;
@@ -166,6 +166,7 @@ service = '''
             &quot;owner_id&quot;: &quot;1&quot;,
             &quot;list_public&quot;: &quot;1&quot;,
             &quot;name&quot;: &quot;Comment Html Service&quot;, 
+            &quot;method_url&quot;: &quot;/api/{format}/comment/{key}?apikey={api_key}&quot;, 
             &quot;key&quot;: &quot;comment&quot;,
             &quot;views&quot;: &quot;&quot;,
             &quot;description&quot;: &quot;Comment html and form &quot;
@@ -175,7 +176,7 @@ service = '''
             &quot;owner_id&quot;: &quot;1&quot;,
             &quot;list_public&quot;: &quot;1&quot;,
             &quot;name&quot;: &quot;Email Template service&quot;, 
-            &quot;method_url&quot;: &quot;{base_url}/api/xml/email/{key}?apikey={api_key}&quot;, 
+            &quot;method_url&quot;: &quot;/api/xml/email/{key}?apikey={api_key}&quot;, 
             &quot;key&quot;: &quot;email&quot;,
             &quot;format&quot;: &quot;xml&quot;,
             &quot;description&quot;: &quot;Email template&quot;
@@ -220,9 +221,9 @@ service = '''
         },{
             &quot;site_id&quot;: &quot;1&quot;,
             &quot;app_id&quot;: &quot;5&quot;,
-            &quot;owner_id&quot;: &quot;4&quot;,
+            &quot;owner_id&quot;: &quot;1&quot;,
             &quot;name&quot;: &quot;Wordpress content service&quot;, 
-            &quot;method_url&quot;: &quot;blog/xmlrpc.php&quot;, 
+            &quot;method_url&quot;: &quot;metaWeblog.getRecentPosts&quot;, 
             &quot;key&quot;: &quot;wordpress&quot;,
             &quot;format&quot;: &quot;xmlrpc&quot;,
             &quot;views&quot;: &quot;&quot;,</diff>
      <filename>demisauce/trunk/demisauce/fixture.py</filename>
    </modified>
    <modified>
      <diff>@@ -19,6 +19,9 @@ from pylons.controllers.util import redirect_to
 import webhelpers.paginate
 import math
 
+def wordpress_page():
+    &quot;&quot;&quot;Get a wordpress page&quot;&quot;&quot;
+    pass
 
 def dspager(qry,perpage=15):
     temp = &quot;&quot;&quot;</diff>
      <filename>demisauce/trunk/demisauce/lib/helpers.py</filename>
    </modified>
    <modified>
      <diff>@@ -34,13 +34,13 @@ class App(ModelBase):
     info about service, partly from declatative (in code)
     partly from app registration/webadmin, partly config ???
     
-    :name: name of the service
-    :description:  description of service
+    :name: name of the Application
+    :slug: url/app friendly key for this app
+    :description:  description of Application
     :base_url:  base url of site (http://localhost:4950 if dev etc)
     :site:  site of this app
     :authn:  which authN method?
-    :cache:  where to cache (memcached, config etc)
-    :env:   [dev,test,prod] (needed???  or ?:  leave for later)
+    :list_public:  True/False to show publicly for other users and accounts
     &quot;&quot;&quot;
     def __init__(self, **kwargs):
         super(App, self).__init__(**kwargs)</diff>
      <filename>demisauce/trunk/demisauce/model/service.py</filename>
    </modified>
    <modified>
      <diff>@@ -44,7 +44,7 @@
         &lt;div class=&quot;box box2&quot;&gt;
              &lt;h3 style=&quot;&quot;&gt;Other Services for ${c.item.name}&lt;/h3&gt;
              % if c.item is not None and c.item.services:
-                 ${service.appminilist(c.item.services)}
+                 ${service.minilist(c.item.services)}
              % endif
          &lt;/div&gt;
          </diff>
      <filename>demisauce/trunk/demisauce/templates/service/app.html</filename>
    </modified>
    <modified>
      <diff>@@ -42,6 +42,12 @@
     
     % if c.item:
         &lt;div class=&quot;box box2&quot;&gt;
+             &lt;h3 style=&quot;&quot;&gt;Other Services for App: ${c.item.app.name}&lt;/h3&gt;
+             % if c.item is not None and c.item.app.services:
+                 ${service.minilist(c.item.app.services)}
+             % endif
+         &lt;/div&gt;
+        &lt;div class=&quot;box box2&quot;&gt;
              &lt;h3 style=&quot;&quot;&gt;Other Services for ${c.item.site.name}&lt;/h3&gt;
              % if c.item is not None and c.item.site.services:
                  ${service.minilist(c.item.site.services)}</diff>
      <filename>demisauce/trunk/demisauce/templates/service/service.html</filename>
    </modified>
    <modified>
      <diff>@@ -132,6 +132,17 @@
                     &lt;label for=&quot;app_name&quot;&gt;App Name&lt;/label&gt;
                     ${h.text_field('app_name', value=(item and item.name) or '', size=40)}
                 &lt;/div&gt;
+                &lt;div class=&quot;required&quot; id=&quot;permalink_div2&quot; style=&quot;display:block;&quot;&gt;
+                    &lt;label for=&quot;slug&quot;&gt;Permalink:&lt;/label&gt;
+                    &lt;span id=&quot;permalink2&quot; class=&quot;secondary&quot;&gt;
+                        &lt;span id=&quot;editable-slug-span2&quot; title=&quot;Click to edit this part of the permalink&quot;&gt;${(item and item.slug) or ''}&lt;/span&gt;
+                        &lt;a href=&quot;javascript:void(0)&quot; id=&quot;editable-slug-href2&quot;&gt;Edit&lt;/a&gt;
+                    &lt;/span&gt;
+                    &lt;input type=&quot;hidden&quot;  size=&quot;100&quot; id=&quot;permalink2&quot;  value=&quot;${(item and item.slug) or ''}&quot; /&gt;
+                    &lt;br /&gt;
+                    &lt;input type=&quot;text&quot; id=&quot;real_permalink2&quot; name=&quot;real_permalink2&quot; 
+                        value=&quot;${(item and item.slug) or ''}&quot; style=&quot;display:none;&quot;/&gt;
+                &lt;/div&gt;
                 &lt;div class=&quot;required&quot;&gt;
                      &lt;label for=&quot;base_url&quot;&gt;Base Url&lt;/label&gt;
                      ${h.text_field('base_url', value=(item and item.base_url) or '', size=40)}
@@ -145,7 +156,7 @@
                         &lt;legend&gt;Auth Method?&lt;/legend&gt;
                         ${h.radio_button('authn', 'demisauce',checked=(item and str(item.authn)  == 'demisauce'))} demisauce &lt;br /&gt;
                         ${h.radio_button('authn', 'oauth',checked=(item and str(item.authn)  == 'oauth'))} oauth &lt;br /&gt;
-                        ${h.radio_button('authn', 'CAS',checked=(item and str(item.authn)  == 'CAS'))} CAS &lt;br /&gt;
+                        ${h.radio_button('authn', 'xmlrpc',checked=(item and str(item.authn)  == 'xmlrpc'))} xmlrpc &lt;br /&gt;
                         ${h.radio_button('authn', 'None',checked=(item and str(item.authn) == 'None'))} None &lt;br /&gt;
                     &lt;/fieldset&gt; 
                 &lt;/div&gt;
@@ -158,7 +169,11 @@
     ${h.end_form()}
     &lt;script type=&quot;text/javascript&quot;&gt;
     $(document).ready(function(){
-
+        $('#app_form').slugeditor({permalink_sel: '#real_permalink2',
+                permalink_span: '#editable-slug-span2',
+                permalink_edit: '#editable-slug-href2',
+                permalink_div: '#permalink_div2',
+                slugfrom: '#app_name'});
     });
     &lt;/script&gt;
 &lt;/%def&gt;
@@ -213,6 +228,7 @@
     &lt;dt&gt;AuthN:&lt;/dt&gt;         &lt;dd&gt;${item.app.authn}&lt;/dd&gt;
     &lt;dt&gt;Service URL:&lt;/dt&gt;   &lt;dd&gt;${item.method_url or 'na'}&lt;/dd&gt;
     &lt;dt&gt;View XML:&lt;/dt&gt;      &lt;dd&gt;${h.link_to('View Xml', &quot;/api/xml/service/%s/%s&quot; % (item.app.slug,item.key))}&lt;/dd&gt;
+    &lt;dt&gt;Cache Time:&lt;/dt&gt;    &lt;dd&gt;${item.cache_time}&lt;/dd&gt;
     &lt;dt&gt;Description:&lt;/dt&gt;   &lt;dd&gt;${item.description}&lt;/dd&gt;
     
 &lt;/dl&gt;
@@ -222,15 +238,13 @@
 &lt;/%def&gt;
 &lt;%def name=&quot;app_view(item)&quot;&gt;
 &lt;dl&gt;
-    &lt;dt&gt;Name:&lt;/dt&gt;          &lt;dd&gt;&lt;h3&gt;${item.name}&lt;/h3&gt;&lt;/dd&gt;
+    &lt;dt&gt;Name:&lt;/dt&gt;          &lt;dd&gt;&lt;h3&gt;${item.name}
+                    % if c.user and c.user.isadmin and c.user.site_id == item.site_id:
+                            ${h.link_to('Edit', h.url(controller=&quot;service&quot;,action=&quot;appeditform&quot;, id=item.id))}
+                    % endif
+    &lt;/h3&gt;&lt;/dd&gt;
     &lt;dt&gt;Slug:&lt;/dt&gt;          &lt;dd&gt;${item.slug}&lt;/dd&gt;
-    % if c.user and c.user.isadmin and c.user.site_id == item.site_id:
-    &lt;dt&gt;Edit:&lt;/dt&gt;        &lt;dd&gt;
-                                
-                                    ${h.link_to('Edit', h.url(controller=&quot;service&quot;,action=&quot;appeditform&quot;, id=item.id))}
-                                
-                            &lt;/dd&gt;
-    % endif
+
     &lt;dt&gt;Author:&lt;/dt&gt;        &lt;dd&gt;
                                 % if c.user and c.user.isadmin and c.user.site_id == item.site_id:
                                     ${h.link_to(item.owner.displayname, h.url(controller=&quot;account&quot;,action=&quot;viewh&quot;, id=item.owner.hashedemail))}</diff>
      <filename>demisauce/trunk/demisauce/templates/service/service_bits.html</filename>
    </modified>
    <modified>
      <diff>@@ -81,7 +81,7 @@ ${h.form(h.url(action='edit'), method='post', id=&quot;site_form&quot;)}
     &lt;/div&gt;
     &lt;div class=&quot;actions&quot;&gt;
         &lt;input type=&quot;submit&quot; class=&quot;primary&quot; id=&quot;submit&quot; value=&quot;Save &amp;#187;&quot;&gt;
-        &amp;nbsp;&amp;nbsp;&lt;a href=&quot;/admin&quot; id=&quot;cancelnode&quot;&gt;cancel&lt;/a&gt;
+        &amp;nbsp;&amp;nbsp;&lt;a href=&quot;/site/view&quot; id=&quot;cancelnode&quot;&gt;cancel&lt;/a&gt;
     &lt;/div&gt;
 &lt;/div&gt;
 </diff>
      <filename>demisauce/trunk/demisauce/templates/site/site_edit.html</filename>
    </modified>
    <modified>
      <diff>@@ -37,7 +37,7 @@ def LoadConfig(file, config={}):
 def hash_email(email):
     return hashlib.md5(email.lower()).hexdigest()
 
-def UrlFormatter(url_format,sub_dict):
+def args_substitute(url_format,sub_dict):
     for k in sub_dict.keys():
         if sub_dict[k] is not None:
             url_format = url_format.replace('{%s}'%k,sub_dict[k])
@@ -85,28 +85,38 @@ class ServiceDefinition(object):
         if base_url == None:
             self.base_url = cfg.CFG['demisauce.url']
     
+    def substitute_args(self,pattern,data={},request=''):
+        &quot;&quot;&quot;Create a dictionary of all name/value pairs
+        you could reasonably expect to use in substitution&quot;&quot;&quot;
+        data.update({&quot;base_url&quot;:self.base_url,
+            &quot;format&quot;:self.format,
+            &quot;service&quot;:self.name,
+            &quot;key&quot;:request, 
+            &quot;request&quot;:request,
+            &quot;app_slug&quot;:self.app_slug,
+            &quot;api_key&quot;:self.api_key})
+        #print('substituteargs = %s' % (data))
+        return args_substitute(pattern, data)
+    
     def get_url(self,request):
         urlformat = ''
-        if self.method_url is not None and self.method_url != &quot;None&quot;:
+        if self.format == 'xmlrpc':
+            urlformat = self.base_url
+        elif self.method_url is not None and self.method_url != &quot;None&quot; and \
+            self.method_url.find('{base_url}') &lt; 0:
             # use service.method_url not url_format
-            urlformat =  '{base_url}/%s' % (self.method_url)
+            if self.method_url.find('/') == 0:
+                urlformat =  '{base_url}%s' % (self.method_url)
+            else:
+                urlformat =  '{base_url}/%s' % (self.method_url)
         else:
             urlformat = self.url_format
-        urlformat = urlformat.replace('//','/')
-        d = {}
+        url = ''
         try:
-            d = {&quot;base_url&quot;:self.base_url,
-                &quot;format&quot;:self.format,
-                &quot;service&quot;:self.name,
-                &quot;method_url&quot;:self.method_url,
-                &quot;key&quot;:request, 
-                &quot;request&quot;:request,
-                &quot;app_slug&quot;:self.app_slug,
-                &quot;api_key&quot;:self.api_key}
+            url = self.substitute_args(urlformat,request=request)
         except AttributeError, e:
             raise RetrievalError('Attribute URL problems')
-        #print('urlformat=%s, d=%s' % (urlformat,d))
-        return UrlFormatter(urlformat, d)
+        return url
     
     def clone(self):
         &quot;&quot;&quot;Create a clone of this service definition&quot;&quot;&quot;
@@ -144,7 +154,6 @@ class ServiceDefinition(object):
         client.use_cache = self.cache
         #client.connect()
         #client.authorize()
-        #print('about to call request= %s/%s' % (self.app_slug, self.name))
         response = client.fetch_service(request=('%s/%s' % (self.app_slug, self.name)))
         #print response.data
         # setup more service definition
@@ -278,9 +287,13 @@ class GAEXMLRPCTransport(object):
     
 
 class XmlRpcServiceTransport(ServiceTransportBase):
+    def __init__(self, request=None,**kwargs):
+        super(XmlRpcServiceTransport, self).__init__(**kwargs)
+        self.request = request
+    
     #http://svn.python.org/projects/python/trunk/Lib/xmlrpclib.py
     def fetch(self,url,data={},extra_headers={},response=None):
-        print 'in xmlrpcservicetransport: %s' % url
+        #print('in xmlrpcservicetransport: %s' % url)
         response = response or ServiceResponse()
         if openanything.ISGAE == True:
             rpc_server = xmlrpclib.ServerProxy(url,
@@ -291,11 +304,22 @@ class XmlRpcServiceTransport(ServiceTransportBase):
         #response.data = rpc_server.blogger.getUsersBlogs('','admin','admin')
         #response.data = rpc_server.metaWeblog.getRecentPosts(1,'admin', 'admin', 5)
         #response.data = getattr(getattr(rpc_server,'metaWeblog'),'getRecentPosts')(1,'admin', 'admin', 5)
-        t = tuple([s for s in '1,admin,admin,5'.split(',')])
-        response.data = getattr(rpc_server,'metaWeblog.getRecentPosts')(t)
-        response.format = 'xmlrpc'
-        response.xmlrpc = xmlrpcreflector.parse_result(response.data)
-        logging.debug('request successful?')
+        #print('inXmlRpcTransport.fetch data=%s' % (data))
+        #print('inXmlRpcTransport.fetch method_url=%s' % (self.service.method_url))
+        # wp.getPage,{blog_id},{request},{user},{password}
+        args = self.service.substitute_args(self.service.method_url,data=data,request=self.request)
+        args = args.split(',')
+        if len(args) &gt; 0:
+            method = args[0]
+            t = tuple([s for s in args[1:]])
+            #response.data = getattr(rpc_server,'metaWeblog.getRecentPosts')(t)
+            #print('inXmlRpcTransport.fetch args=%s' % (args))
+            response.data = getattr(rpc_server,method)(t)
+            #print('In XmlrpcFetch, data= %s' % (response.data))
+            response.format = 'xmlrpc'
+            response.xmlrpc = xmlrpcreflector.parse_result(response.data)
+        response.success = True
+        #print('exiting xmlrpc.fetch')
         return response
     
 
@@ -429,14 +453,15 @@ class ServiceClient(ServiceClientBase):
         
         if self.service.format == 'xmlrpc':
             log.debug('about to create xmlrpc servicetransport')
-            self.transport = XmlRpcServiceTransport()
+            self.transport = XmlRpcServiceTransport(request=request)
             self.transport.service = self.service
         url = self.service.get_url(request=request)
         self.response.url = url
+        #print('About to call fetch_service url= %s' % (url))
         cache_key = self.cache_key(url=url)
         log.debug('about to check cache for url=%s' % url)
-        #print('url = %s' % (url))
         if not self.check_cache(cache_key):
+            #print('no cache found')
             self.response = self.transport.fetch(url,data=data,extra_headers=self.extra_headers)
             if self.response.success:
                 log.debug('success for service %s, %s' % (self.service.name,cache))</diff>
      <filename>demisaucepy/trunk/demisaucepy/__init__.py</filename>
    </modified>
    <modified>
      <diff>@@ -20,7 +20,7 @@ from demisaucepy import cfg
 from demisaucepy.cache import cache
 from demisaucepy import demisauce_ws, hash_email, \
     ServiceDefinition, ServiceClient, RetrievalError, \
-    UrlFormatter
+    args_substitute
 
 
 DSDEBUG = False
@@ -108,7 +108,7 @@ class ServiceHandler(object):
         d = {&quot;app_slug&quot;:self.this_app_slug,
             &quot;class_name&quot;:self.model_instance.__class__.__name__,
             &quot;local_key&quot;:str(getattr(self.model_instance,self.local_key))}
-        return UrlFormatter(self.key_format, d)
+        return args_substitute(self.key_format, d)
     
     def __getattr__(self,get_what):
         log.debug('ServiceHandler __getattr__  %s' % (get_what))</diff>
      <filename>demisaucepy/trunk/demisaucepy/declarative.py</filename>
    </modified>
    <modified>
      <diff>@@ -55,6 +55,11 @@ def demisauce_xmlnodes(**kwargs):
     raise NotImplementedError
     
 
+def wordpress_page(page_id):
+    &quot;&quot;&quot;wordpress content&quot;&quot;&quot;
+    
+    return ''
+
 def remote_html(resource_id='',routes_dict=None,append_path=False,**kwargs):
     &quot;&quot;&quot;
     Accepts a key of which content is desired</diff>
      <filename>demisaucepy/trunk/demisaucepy/pylons_helper.py</filename>
    </modified>
    <modified>
      <diff>@@ -28,16 +28,6 @@ class TestApi(TestDSBase):
         assert email.subject == 'Welcome To Demisauce', 'ensure suject for each node is what we want'
         assert email.key == 'welcome_to_demisauce'
         assert 'Welcome' in email.template
-        
-    def test_cmshtmlget(self):
-        &quot;&quot;&quot;
-        Test the html get capabilities of cms
-        &quot;&quot;&quot;
-        item = demisauce_ws_get('cms','blog',format='html')
-        assert item.success == True
-        assert item.data
-        assert item.data.find('Demisauce Server') &gt;= 0
-        
     
     def test_xmlproc(self):
         &quot;&quot;&quot;
@@ -45,11 +35,25 @@ class TestApi(TestDSBase):
         &quot;&quot;&quot;
         from demisaucepy import cfg
         from demisaucepy.cache import cache
-        from demisaucepy import demisauce_ws, hash_email, \
-            ServiceDefinition, ServiceClient, RetrievalError, \
-            UrlFormatter
-        #from google.appengine.api import urlfetch
+        from demisaucepy import demisauce_ws, hash_email, ServiceClient, \
+            ServiceDefinition, RetrievalError, args_substitute
+        &quot;&quot;&quot;{'wp_author': 'admin', 
+            'userid': '1', 
+            'excerpt': '', 
+            'wp_page_parent_id': '0', 
+            'mt_allow_comments': 1, 
+            'text_more': '', 
+            'custom_fields': [{'value': '1', 'id': '2', 'key': '_edit_last'}, {'value': '1232858127', 'id': '1', 'key': '_edit_lock'}], 
+            'wp_author_id': '1', 
+            'title': 'About', 
+            'wp_password': '', 
+            'wp_page_parent_title': '', 
+            'page_id': '2', 
+            'wp_slug': 'about', 'wp_page_order': '0', 
+            'permaLink': 'http://192.168.0.106/blog/about/', 
+            'description': 'This is an example of a &lt;strong&gt;WordPress&lt;/strong&gt; page, you could edit this to put information about yourself or your site so readers know where you are coming from. You can create as many pages like this one or sub-pages as you like and manage all of your content inside of WordPress.', 'dateCreated': &lt;DateTime '20090124T12:02:32' at 143cda0&gt;, 'wp_author_display_name': 'admin', 'link': 'http://192.168.0.106/blog/about/', 'page_status': 'publish', 'categories': ['Uncategorized'], 'wp_page_template': 'default', 'mt_allow_pings': 1, 'date_created_gmt': &lt;DateTime '20090124T19:02:32' at 143cfa8&gt;}
         
+        &quot;&quot;&quot;
         sd = ServiceDefinition(
                 name='wordpress',
                 app_slug='wordpress'
@@ -58,11 +62,13 @@ class TestApi(TestDSBase):
         sd.method_url = None
         #.service_registry = None
         #self.api_key = api_key
-        sd.base_url = &quot;http://192.168.125.133/blog/xmlrpc.php&quot;
+        #sd.base_url = &quot;http://192.168.0.106/blog/xmlrpc.php&quot;
         client = ServiceClient(service=sd)
         #client.extra_headers = self.extra_headers
-        response = client.fetch_service(request=&quot;wp.getPages&quot;,data={})
+        response = client.fetch_service(request=&quot;2&quot;,data={'blog_id':'1','user':'admin','password':'admin'})
+        page = response.model[0]
         assert client.service.format == 'xmlrpc'
-        
-        assert response.model[0].wp_slug == 'demisauce-official-introduction'
+        assert page.wp_author == 'admin'
+        assert page.wp_slug == 'about'
+        #print page.description
 </diff>
      <filename>demisaucepy/trunk/demisaucepy/tests/test_api.py</filename>
    </modified>
    <modified>
      <diff>@@ -6,6 +6,8 @@ def parse_result(xml_list):
     Recursive call to process this dict
     &quot;&quot;&quot;
     result = []
+    if type(xml_list) is dict:
+        xml_list = [xml_list]
     for row in xml_list:
         if type(row) is not dict and type(row) is not list:
             result.append(row)</diff>
      <filename>demisaucepy/trunk/demisaucepy/xmlrpcreflector.py</filename>
    </modified>
    <modified>
      <diff>@@ -184,7 +184,7 @@ then
         
         Alias /blog /home/demisauce/wordpress
         &lt;Directory &quot;/home/demisauce/wordpress&quot;&gt;
-            AllowOverride None
+            AllowOverride All
             Order allow,deny
             Allow from all
         &lt;/Directory&gt;
@@ -193,7 +193,6 @@ then
         #RewriteLog /home/demisauce/log/apacherw.txt
         #RewriteLogLevel 3
         #RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} -f
-        #RewriteCond %{PATH_INFO} !^/blog/$ # can't get this to work?
         RewriteCond %{REQUEST_FILENAME} !\.(php|js|css|gif|jpg|png|ico|txt|swf|mp3|pdf|ps|wav|mid|midi|flv|zip|rar|gz|tar|bmp)$ [NC]
         RewriteCond %{REQUEST_URI} !^/blog(.*)$ [NC]
         RewriteRule ^/(.*) $PASTER_HOST [P]</diff>
      <filename>install/install.sh</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>3c6f9b90768b6cef4737363ebf393b74123276b2</id>
    </parent>
  </parents>
  <author>
    <name>Aaron Raddon</name>
    <email>araddon@yahoo.com</email>
  </author>
  <url>http://github.com/araddon/demisauce/commit/4dc375ca785fb324f7a7ddce0d6688d23ce1bb6e</url>
  <id>4dc375ca785fb324f7a7ddce0d6688d23ce1bb6e</id>
  <committed-date>2009-01-25T20:02:04-08:00</committed-date>
  <authored-date>2009-01-25T20:02:04-08:00</authored-date>
  <message>wordpress support and testing, wordpress installer, adding slug support to app, service, app cleanup for ui and admin</message>
  <tree>042cab9285fb76a2e3a5271d06b9a92a710820fb</tree>
  <committer>
    <name>Aaron Raddon</name>
    <email>araddon@yahoo.com</email>
  </committer>
</commit>
