def POST(self): i = web.input('username', 'passwd', 'carrera', 'inid', 'inim', 'iniy', nombre = '', padron = '') username = filterstr(i.username) username = username.lower() passwd = filterstr(i.passwd) ret = server.register(username, passwd) if ret != 0: raise web.seeother('register?error=1') sid = server.auth(username, passwd) personal = server.get_personal(sid) personal['nombre'] = i.nombre personal['padron'] = i.padron personal['carrera'] = i.carrera personal['hace_tesis'] = 0 personal['inicio'] = (int(i.inid), int(i.inim), int(i.iniy)) personal['area'] = server.get_areas(i.carrera).keys()[0] ret = server.set_personal(sid, personal) if not ret: print personal print ret # XXX: (?) Ver que es esto... return raise web.seeother('register?error=2') raise web.seeother('login?register_ok=1')
def POST(self): i = web.input('user', 'passwd') user = filterstr(i.user).lower() sid = server.auth(user, i.passwd) if not sid: raise web.seeother("login?failed=1") web.setcookie('sid', sid) raise web.seeother("index")
config = Parser(text).get() client.clonePath(config, newnames) log('[g]\n<-- Connecting with remote Elevate -->@\n') s = client.connect(config['addr'], config['port']) client.login(s, data, config) log('[g]\n<-- Sending Project Files -->@\n') zipFile = os.path.join(newnames['local-root'], newnames['zip']) client.sendFiles(s, zipFile) log('[g]\n<-- Running Server Script -->@\n') client.waitForServer(s) if args.operation == 'serve': s = server.listen(data) while True: client, addr = s.accept() isAuth = server.auth(client, data) if not isAuth: continue server.recvFiles(client, data, newnames) server.unboxProject(client, data, newnames) # Initialize new project # configuration file elif args.operation == 'init': conf.configProject() # Configure Illiade # From scratch elif args.operation == 'config': conf.configExec('none', data_path, exec_path)