Example #1
0
 def get(self, uadd):
     uid = self.SESSION['uid']
     u = User()
     u.whois('added_id', unicode(uadd))
     whoid = u.uid
     wb = Weibo(uid=whoid)
     tp = self.get_argument('tp', None)
     if tp == 'del':
         id = self.get_argument('tpid')
         stamp = self.get_argument('stamp', u'origin')
         wb.remove(stamp, id)
     msg_l = wb.get(u'origin')
     ml = []
     for m in msg_l:
         u.whois('_id', m['uid'])
         m['author'] = u
         ml.append(m)
     self.render("weibo/weibo.html", **{"msg_l": ml, "att": False})
Example #2
0
 def get(self, uadd):
     uid = self.SESSION['uid']
     u = User()
     u.whois('_id', uid)
     self.render("weibo/edit_sync.html", **{'is_auth':u.sina_id})
Example #3
0
 def get(self, uadd):
     uid = self.SESSION['uid']
     u = User()
     u.whois('_id', uid)
     self.render("weibo/edit_status.html", **{'to_sina':True})
Example #4
0
 def __init__(self, uid=None, operate=None):
     self._operate = operate if operate else OperateComp()
     u = User()
     u.whois('_id', uid)
     super(Weibo, self).__init__(u)