Beispiel #1
0
 def post(self):
   
   from cm.model.databaseModel import ListYou
   from cm.model.databaseModel import ListYouTwo
   c = self.request.get("commentIdc")
   cc=int(c)
   q=ListYou.get_by_id(cc)
   ListYou = ListYouTwo(contact=q)
   n=self.request.get("linkname")
   if n=="":
     n="ccdjh"
   l=self.request.get("link")
   if l=="":
     l="http://www.ccdjh.cn"
   else:
       from google.appengine.ext.db import BadValueError
       try:
           l = db.Link(l)
       except BadValueError:
           l="http://www.ccdjh.com"
           
   ListYou.comment = n
   ListYou.link = db.Link(l)
   ListYou.lidc=cc
   ListYou.put()
   m=ListYou.key().id()
   ListYou.idc = m
   ListYou.put()
   self.redirect(self.request.referer)
Beispiel #2
0
 def get(self,idc):    
   g =int(idc)
   y=ListYou.get_by_id(g)
   yy=y.idc
   t=ListYouTwo.all().filter('lidc =', yy)
   db.delete(y)
   db.delete(t)
   self.redirect(self.request.referer)
Beispiel #3
0
 def get(self,idc):    
   g =int(idc)
   y=ListYouTwo.get_by_id(g)
   db.delete(y)
   self.redirect(self.request.referer)