def run_send_all(): muser = MUser() user_recs = muser.query_all() for user_rec in user_recs: email_add = user_rec.user_email print(email_add) send_mail([email_add], "{0}|{1}".format(smtp_cfg['name'], email_cfg['title']), email_cfg['content'])
def initialize(self): self.init() self.muser = MUser() self.mclass = MCategory() if self.get_current_user(): self.userinfo = self.muser.get_by_name(self.get_current_user()) else: self.userinfo = None
def setup(self): print('setup 方法执行于本类中每条用例之前') self.post = MPost() self.user = MUser() self.reply = MReply() self.post_title = 'ccc' self.username = '******' self.uid = tools.get_uu4d()
def __init__(self): self.tab = g_Usage try: g_Usage.create_table() except: pass self.mapp2catalog = MInfor2Catalog() self.muser = MUser()
def setup(self): print('setup 方法执行于本类中每条用例之前') self.user = MUser() self.reply = MReply() self.r2u = MReply2User() self.username = '******' self.password = '******' self.user_uid = '12345' self.reply_uid = '65412'
def setup(self): print('setup 方法执行于本类中每条用例之前') self.M2U = MEntity2User() self.username = '******' self.uu = MUser() self.user_uid = '' self.e_uid = 'q112' self.path = '/static/123123' self.userip = '10.6.0.177' self.ee = MEntity() self.uid = ''
def setup(self): print('setup 方法执行于本类中每条用例之前') self.post = MPost() self.user = MUser() self.reply = MReply() self.r2u = MReply2User() self.post_title = 'fwwgccc' self.username = '******' self.user_uid = '' self.reply_uid = '' self.post_uid = '998h' self.password = '******'
def run_create_admin(): post_data = { 'user_name': 'giser', 'user_email': '*****@*****.**', 'user_pass': '******', 'role': 'fffff', } muser = MUser() entry = muser.get_by_name(post_data['user_name']) if entry: pass else: muser.insert_data(post_data)
def run_create_admin(): post_data = { 'user_name': ['giser'], 'user_email': ['*****@*****.**'], 'user_pass': ['131322'], 'privilege': ['fffff'], } muser = MUser() entry = muser.get_by_name(post_data['user_name'][0]) if entry: pass else: muser.insert_data(post_data)
def do_member(): print('==============================') print('For Member ... ') from model_ent.user_model import MUser as OldUser mraw_user = OldUser() from torcms.model.user_model import MUser muser = MUser() for uu in mraw_user.query_all(limit_num=200000): data_dic = { 'uid': uu.uid, 'user_name': uu.user_name, 'user_pass': uu.user_pass, 'user_email': uu.user_email, 'role': uu.privilege, } muser._copy_user(data_dic)
def initialize(self): self.init() self.muser = MUser() self.user_name = self.get_current_user() self.tmpl_dir = 'admin' self.tmpl_router = 'user_ajax'
def setup(self): print('setup 方法执行于本类中每条用例之前') self.uu = MUser() self.username = '******'
def init(self): self.muser = MUser() if self.get_current_user(): self.userinfo = self.muser.get_by_name(self.get_current_user()) else: self.userinfo = None
def initialize(self): self.init() self.muser = MUser() self.user_name = self.get_current_user() self.tmpl_router = 'info'