def get(self): username = self.get_argument('username') password = self.get_argument('password') r,v = add(username,password,self.get_argument('city',None)) if '@' in username: username,emailhost = username.split('@') openfire_add(username,password,username) self.write(dict(status = r, data = v))
def get(self): username = self.get_argument('username') password = self.get_argument('password') r, v = add(username, password, self.get_argument('city', None)) if '@' in username: username, emailhost = username.split('@') openfire_add(username, password, username) self.write(dict(status=r, data=v))
def post(self): username = self.get_argument('username', None) password = self.get_argument('password', None) result, value = add(username, password, self.get_argument('city', None), status=INIT) if result: if '@' in username: username, email_host = username.split('@') openfire_add(username, password, username) self.write(dict(status=result, data=value))
def post(self): _id = self.get_argument("id", None) username = self.get_argument("username", None) password = self.get_argument("password", None) email = self.get_argument("email", None) tel = self.get_argument("tel", '') city = self.get_argument("city", '') isadmin = bool(self.get_argument('isadmin', 'True')) cond = dict(email=email, tel=tel, isadmin=isadmin, city=city) if not _id: r, v = add(username, password, **cond) #self.write(dict(status = r, data =v )) else: r, v = m_update(T_ACCOUNT, _id, **cond) #self.write(dict(status = r)) self.redirect('/admin/account')
def post(self): _id = self.get_argument("id", None) username = self.get_argument("username", None) password = self.get_argument("password", None) email = self.get_argument("email", None) tel = self.get_argument("tel", '') city = self.get_argument("city", '') isadmin = bool(self.get_argument('isadmin','True')) cond = dict(email = email, tel = tel, isadmin = isadmin,city=city) if not _id: r,v = add(username, password, **cond) #self.write(dict(status = r, data =v )) else: r,v = m_update(T_ACCOUNT,_id, **cond) #self.write(dict(status = r)) self.redirect('/admin/account')