def query_all(**kwargs):
        '''
        query all the posts.
        '''
        kind = kwargs.get('kind', '1')
        limit = kwargs.get('limit', 10)

        return TabPost.select().where(
            (TabPost.kind == kind) &
            (TabPost.valid == 1)
        ).order_by(
            TabPost.time_update.desc()
        ).limit(limit)
def query_all ( ** kwargs ) : kind = kwargs . get ( 'kind' , '1' ) limit = kwargs . get ( 'limit' , 10 ) return TabPost . select ( ) . where ( ( TabPost . kind == kind ) & ( TabPost . valid == 1 ) ) . order_by ( TabPost . time_update . desc ( ) ) . limit ( limit )
query all the posts.