code: def _to_add(self, **kwargs):
          '''
          Used for info1.
          '''
  
          if 'catid' in kwargs:
              catid = kwargs['catid']
              return self._to_add_with_category(catid)
  
          else:
              if 'uid' in kwargs and MPost.get_by_uid(kwargs['uid']):
                  # todo:
                  # self.redirect('/{0}/edit/{1}'.format(self.app_url_name, uid))
                  uid = kwargs['uid']
              else:
                  uid = ''
              self.render('post_{0}/post_add.html'.format(self.kind),
                          tag_infos=MCategory.query_all(by_order=True, kind=self.kind),
                          userinfo=self.userinfo,
                          kwd={'uid': uid, }f _to_add(self, **kwargs):
          '''
          Used for info1.
          '''
  
          if 'catid' in kwargs:
              catid = kwargs['catid']
              return self._to_add_with_category(catid)
  
          else:
              if 'uid' in kwargs and MPost.get_by_uid(kwargs['uid']):
                  # todo:
                  # self.redirect('/{0}/edit/{1}'.format(self.app_url_name, uid))
                  uid = kwargs['uid']
              else:
                  uid = ''
              self.render('post_{0}/post_add.html'.format(self.kind),
                          tag_infos=MCategory.query_all(by_order=True, kind=self.kind),
                          userinfo=self.userinfo,
                          kwd={'uid': uid, })
docs: Used for info1.