Ejemplo n.º 1
0
    def get(self, ad_id):
        advertiser = Advertisers.find_one(dict(user_id=int(ad_id)))
        white_list = advertiser.white_list
        advertiser.white_list = ','.join(white_list) if white_list else ''
        user = User._get(advertiser.user_id)
        spec = dict(deleted=False, role_id=Role.bd()._id)
        bds = User.find(spec)
        pms = User.find(dict(role_id=Role.pm()._id), deleted=False)
        if user:
            advertiser['name'] = user.account
            advertiser['email'] = ','.join(user.email)
            advertiser['skype_id'] = user.skype_id
            advertiser['password'] = user.password

        self.render(account_managers=bds, pms=pms, advertiser=advertiser)
Ejemplo n.º 2
0
 def get(self):
     spec = dict(role_id=Role.bd()._id, deleted=False)
     account_managers = User.find(spec)
     pms = User.find(dict(role_id=Role.pm()._id, deleted=False))
     self.render(account_managers=account_managers, pms=pms)