Logo Search packages:      
Sourcecode: zope-coreblog version File versions

def zope-coreblog-1.0::COREBlog::COREBlog::getPost (   self,
  postid,
  username,
  password,
  REQUEST = None 
)

Return entry informations 

Definition at line 1878 of file COREBlog.py.

01878                                                            :
        """ Return entry informations """
        import xmlrpclib
        try:
            int_id = int(postid)
            #get entry
            ent = self.getEntry(int_id)
            c = convert_charcode
            bc = self.get_blogclient_charcode()
          cnv_brk = '0'
          if ent.format == format_plain:
            cnv_brk = '1'
            return {'userid':c(ent.author,bc,self.get_charcode()),
                    'dateCreated':xmlrpclib.DateTime(ent.date_created()),
                    'postid':str(ent.id),
                    'description':c(ent.body,bc,self.get_charcode()),
                    'title':c(ent.title,bc,self.get_charcode()),
                    'link':self.blog_url + '/' + str(ent.id),
                    'permaLink':self.blog_url + '/' + str(ent.id),
                    'mt_text_more':c(ent.extend,bc,self.get_charcode()),
                    'mt_excerpt':c(ent.excerpt,bc,self.get_charcode()),
                    'mt_allow_comments':ent.allow_comment,
                    'mt_allow_pings':ent.receive_trackback,
                    'mt_convert_breaks':cnv_brk,
                    'mt_keywords':''}
            return xmlrpclib.True
        except:
            return xmlrpclib.False

    security.declareProtected(ManageCOREBlog, 'getRecentPostsMW')
    def getRecentPostsMW(self,blogid,username,password,numberOfPosts,REQUEST=None):


Generated by  Doxygen 1.6.0   Back to index