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

def zope-coreblog-1.0::COREBlog::COREBlog::manage_calculateCategory (   self,
  REQUEST = None 
)

recalculate category counts

Definition at line 1299 of file COREBlog.py.

01299                                                    :
        """recalculate category counts"""
        for key in self.categories.keys():
            cat = self.categories[key]
            cat.set_count(0)
        for id in self.entry_list:
            ent = self.getEntry(id)
            if ent.category:
                cat = self.categories[ent.category[0]]
                cat.set_count(cat.get_count()+1)

        #reset datemap
        self.datemap = IOBTree()
        objs = self.entry_items()
        for obj in objs:
            self.setIDToDatemap(obj.year_created(),obj.month_created(),obj.day_created(),obj.id)

        if REQUEST:
            return REQUEST.RESPONSE.redirect(REQUEST['HTTP_REFERER'])


    #
    # Methods for settings


Generated by  Doxygen 1.6.0   Back to index