def errcat(self):
        '''
        List the posts to be modified.
        '''
        post_recs = MPost.query_random(limit=1000)
        outrecs = []
        errrecs = []
        idx = 0
        for postinfo in post_recs:
            if idx > 16:
                break
            cat = MPost2Catalog.get_first_category(postinfo.uid)
            if cat:
                if 'def_cat_uid' in postinfo.extinfo:
                    if postinfo.extinfo['def_cat_uid'] == cat.tag_id:
                        pass
                    else:
                        errrecs.append(postinfo)
                        idx += 1
                else:
                    errrecs.append(postinfo)
                    idx += 1
            else:
                outrecs.append(postinfo)
                idx += 1
        self.render('list/errcat.html',
                    kwd={},
                    norecs=outrecs,
                    errrecs=errrecs,
                    userinfo=self.userinfo)
def errcat ( self ) : post_recs = MPost . query_random ( limit = 1000 ) outrecs = [ ] errrecs = [ ] idx = 0 for postinfo in post_recs : if idx > 16 : break cat = MPost2Catalog . get_first_category ( postinfo . uid ) if cat : if 'def_cat_uid' in postinfo . extinfo : if postinfo . extinfo [ 'def_cat_uid' ] == cat . tag_id : pass else : errrecs . append ( postinfo ) idx += 1 else : errrecs . append ( postinfo ) idx += 1 else : outrecs . append ( postinfo ) idx += 1 self . render ( 'list/errcat.html' , kwd = { } , norecs = outrecs , errrecs = errrecs , userinfo = self . userinfo )
List the posts to be modified.