def post(self): """ args: _id """ roleid = self.get_argument('_id') status = mongo_util.m_del(T_ROLE, _id = ObjectId(roleid)) self.write(dict(status = status))
def post(self): """ args: uid """ kwargs = dict((k, v[-1]) for k, v in self.request.arguments.items()) uid = kwargs.pop('uid') status = mongo_util.m_del(T_PASSPORT, _id = ObjectId(uid)) self.write(dict(status = status))