Changeset 695

Show
Ignore:
Timestamp:
12/15/06 08:56:20
Author:
mylan
Message:

Install RPCAuth object to portal root, add getBody function to blogentry.py

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • SimpleBlog/trunk/Extensions/Install.py

    r694 r695  
    66from Products.CMFDynamicViewFTI.migrate import migrateFTIs 
    77from Products.SimpleBlog.config import * 
     8from Products.RPCAuth.RPCAuth import manage_addRPCAuth 
    89 
    910portlets=['here/portlet_simpleblog/macros/portletBlogFull_local',  
     
    1112          'here/portlet_simpleblog/macros/portletBlogRecent_local', 
    1213          'here/portlet_simpleblog/macros/portletBlogRecent_global'] 
     14 
     15def addRPCAuth(self, out): 
     16    """ Add RPC Auth object to the root of the site. 
     17    """ 
     18    portal = getToolByName(self, 'portal_url').getPortalObject() 
     19    rpcauth = getToolByName(portal, 'RPCAuth', None) 
     20    if rpcauth is None: 
     21        manage_addRPCAuth(portal,'RPCAuth') 
     22        print >>out, 'Installing RPC Auth' 
     23    else: 
     24        print >>out, 'RPC Auth already installed' 
     25 
    1326 
    1427def install(self): 
     
    128141    wf_tool.setChainForPortalTypes(('Blog','BlogFolder'), 'folder_workflow')         
    129142 
     143    addRPCAuth(self, out) 
     144 
    130145    print >> out, "Successfully installed %s." % PROJECTNAME 
    131146    return out.getvalue() 
  • SimpleBlog/trunk/content/blogentry.py

    r694 r695  
    275275        return tuple(tags) 
    276276 
     277    def getBody(self): 
     278        return self.getField('body').get(self) 
    277279 
    278280registerType(BlogEntry)