code: def query_by_tag(cat_id, kind='1'):
          '''
          Query recent posts of catalog.
          '''
  
          return TabPost.select().join(
              TabPost2Tag,
              on=(TabPost.uid == TabPost2Tag.post_id)
          ).where(
              (TabPost.kind == kind) &
              (TabPost2Tag.tag_id == cat_id)
          ).order_by(
              TabPost.time_create.desc()
          f query_by_tag(cat_id, kind='1'):
          '''
          Query recent posts of catalog.
          '''
  
          return TabPost.select().join(
              TabPost2Tag,
              on=(TabPost.uid == TabPost2Tag.post_id)
          ).where(
              (TabPost.kind == kind) &
              (TabPost2Tag.tag_id == cat_id)
          ).order_by(
              TabPost.time_create.desc()
          )
docs: Query recent posts of catalog.