Beispiel #1
0
 def get(self, id):
     zsite = Zsite.mc_get(id)
     rank = self.get_argument('rank', 0)
     rank = int(rank)
     if zsite:
         zsite_show_new(id, zsite.cid, rank)
     self.redirect('/zsite/%s' % id)
Beispiel #2
0
def site_new(name, admin_id, state):
    if state not in ZSITE_STATE_SITE2CN_DICT:
        state = ZSITE_STATE_SITE_PUBLIC

    site = zsite_new(name, CID_SITE, state)
    site_id = site.id
    zsite_admin_new(site_id, admin_id)

    if state > ZSITE_STATE_SITE_SECRET:
        zsite_show_new(site_id, CID_SITE)

    mq_buzz_site_new(admin_id, site_id)
    search_new(site_id)
    return site
def recover():
    rec = []
    for z in Zsite.where(cid=3, state=0):
        if Rss.get(user_id=z.id):
            rec.append(z)

    #  print rec
    rec_name = [i.name for i in rec]
    # print rec_name

    rm = []
    for z in Zsite.where(cid=3, state=40):
        if z.name in rec_name:
            rm.append(z)

    for z in rec:
        z.state = 40
        zsite_admin_new(z.id, 10017321)
        z.save()
        zsite_show_new(z.id, 3)

    for z in rm:
        zsite_site_rm(z.id)
Beispiel #4
0
def recover():
    rec = []
    for z in Zsite.where(cid=3, state=0):
        if Rss.get(user_id=z.id):
            rec.append(z)

    #  print rec
    rec_name = [i.name for i in rec]
    # print rec_name

    rm = []
    for z in Zsite.where(cid=3, state=40):
        if z.name in rec_name:
            rm.append(z)

    for z in rec:
        z.state = 40
        zsite_admin_new(z.id, 10017321)
        z.save()
        zsite_show_new(z.id, 3)

    for z in rm:
        zsite_site_rm(z.id)
Beispiel #5
0
 def get(self, id):
     zsite_show_new(id, CID_SITE)
     self.redirect('/site')
Beispiel #6
0
 def get(self, id):
     zsite = Zsite.mc_get(id)
     zsite_show_new(id, zsite.cid)
     return self.redirect("/zsite/verify/next/%s" % id)