<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def _delete(self, *args, **kwargs):
        '''
        delete the post.
        '''
        _ = kwargs
        uid = args[0]
        current_infor = MPost.get_by_uid(uid)

        if MPost.delete(uid):

            tslug = MCategory.get_by_uid(current_infor.extinfo['def_cat_uid'])

            MCategory.update_count(current_infor.extinfo['def_cat_uid'])

            if router_post[self.kind] == 'info':
                url = "filter"
                id_dk8 = current_infor.extinfo['def_cat_uid']

            else:
                url = "list"
                id_dk8 = tslug.slug

            self.redirect('/{0}/{1}'.format(url, id_dk8))

        else:
            self.redirect('/{0}/{1}'.format(router_post[self.kind], uid))