Esempio n. 1
0
 def get(self):
     uname=self.request.get('UserName') or ''
     replayType='21'
     idset=set()
     contentlist=[]
     getMapList(contentlist,APPCODE+'-s1',APPCODE,'',APPCODE,'100',u'图片组','','1',replayType)
     if uname:
         u=User.get_by_key_name('u000')
         for ugid in u.grouplist:
             if ugid not in idset:
                 imggroup=ImgGroup.get_by_id(ugid)
                 getMapList(contentlist,APPCODE+'-s1-'+str(imggroup.key().id()),APPCODE+'-s1','',APPCODE,'101',imggroup.group+u'(默认)',imggroup.updateTime,'1',replayType)
                 idset.add(ugid)
         u=User.get_by_key_name('u'+uname)
         if u:
             for ugid in u.grouplist:
                 if ugid not in idset:
                     imggroup=ImgGroup.get_by_id(ugid)
                     getMapList(contentlist,APPCODE+'-s1-'+str(imggroup.key().id()),APPCODE+'-s1','',APPCODE,'101',imggroup.group+u'(已下载)',imggroup.updateTime,'1',replayType)
                     idset.add(ugid)
     for imggroup in ImgGroup.all():
         if imggroup.key().id() not in idset:
             getMapList(contentlist,APPCODE+'-s1-'+str(imggroup.key().id()),APPCODE+'-s1','',APPCODE,'101',imggroup.group,imggroup.updateTime,'1',replayType)
             idset.add(ugid)
     xml,datas=infoallxmldic(contentlist)
     self.response.out.write(xml.toxml('utf-8'))
Esempio n. 2
0
 def get(self):
     imgid=self.request.get("imgid") or ''
     group=None
     groupid=self.request.get('groupid') or ''
     if groupid:
         groupid=int(groupid)
         group=ImgGroup.get_by_id(int(groupid))
     grouplist=ImgGroup.all().order('-updateTime')
     self.render('templates/picadd.html',{'groupid':groupid,'group':group,'grouplist':grouplist,'imgid':imgid})
Esempio n. 3
0
 def get(self):
     updateid=self.request.get('groupid') or ''
     group=''
     if updateid:
         group=ImgGroup.get_by_id(int(updateid))
         if group:
             group=group.group
     grouplist=ImgGroup.all().order('-updateTime')
     self.render('templates/group.html',{'grouplist':grouplist,'updateid':updateid,'group':group})
Esempio n. 4
0
 def get(self):
     user=self.request.get('UserName') or '000'
     if user:
         u=User.get_by_key_name('u'+user)
         grouplist=[]
         if u:
             grouplist=ImgGroup.get_by_id(u.grouplist)
         self.render('templates/groupuser.html',{'usergrouplist':grouplist,'grouplist':ImgGroup.all()})