Exemple #1
0
 def get(self):
     if not checkUser(self):
         self.response.out.write("1")
         return
     userName = self.request.get("UserName").strip()
     xml = None
     datas = None
     userUpdate = UserUpdate.get_by_userName(userName)
     codeListPart = userUpdate.updateContent  # 只要本层订阅方式
     codeListAll = []  # 全要型的订阅
     codeListDelete = []
     for sub in Subscribe.get_by_key_name(userUpdate.updateSubscribe):
         if "0" == sub.status:
             codeListDelete.append(sub.code)
         else:
             if "0" == sub.subscribeType:
                 codeListAll.append(sub.code)
             codeListPart.append(sub.code)
     xml, datas = infoallxmldic(ContentClass.get_by_key_name(codeListPart), xml, datas)
     for c in codeListAll:
         xml, datas = infoallxmldic(findChildNodes(c, "1").filter("userName ="******""), xml, datas)
     xml, datas = infoallxmldic(codeListDelete, xml, datas, True)
     datas.setAttribute("type", "infoupdate")
     userAppData(userName, datas)
     self.response.out.write(xml.toxml("utf-8"))
     userUpdate.updateSubscribe = []
     userUpdate.updateContent = []
     userUpdate.put()
     return
Exemple #2
0
 def get(self):
   userName = self.request.get('userName')
   if userName=='000':
       return
   index = self.request.get('index')
   user=User.get_by_keyname('u'+userName)
   if user:
       user.delete()
   sq=Subscribe.all().filter('userName ='******'u'+userName)
       if u:
           u.delete()
   contentq=ContentClass.all().filter('userName ='******'/userList/%s' %index)