code: def add_url(self, post_data):
          '''
          Adding the URL as entity.
          '''
          img_desc = post_data['desc']
          img_path = post_data['file1']
          cur_uid = tools.get_uudd(4)
          while MEntity.get_by_uid(cur_uid):
              cur_uid = tools.get_uudd(4)
          MEntity.create_entity(cur_uid, img_path, img_desc, kind=post_data['kind'] if 'kind' in post_data else '3')
          kwd = {
              'kind': post_data['kind'] if 'kind' in post_data else '3',
  
          }
          self.render('misc/entity/entity_view.html',
                      filename=img_path,
                      cfg=config.CMS_CFG,
                      kwd=kwd,
                      userinfo=self.userinfof add_url(self, post_data):
          '''
          Adding the URL as entity.
          '''
          img_desc = post_data['desc']
          img_path = post_data['file1']
          cur_uid = tools.get_uudd(4)
          while MEntity.get_by_uid(cur_uid):
              cur_uid = tools.get_uudd(4)
          MEntity.create_entity(cur_uid, img_path, img_desc, kind=post_data['kind'] if 'kind' in post_data else '3')
          kwd = {
              'kind': post_data['kind'] if 'kind' in post_data else '3',
  
          }
          self.render('misc/entity/entity_view.html',
                      filename=img_path,
                      cfg=config.CMS_CFG,
                      kwd=kwd,
                      userinfo=self.userinfo)
docs: Adding the URL as entity.