async def F(*params, **kParames): _params = [pure(i) for i in params] _kParams = dict() for i in kParames: _kParams[i] = pure(kParames[i]) x = f(*_params, **_kParams).execute return x
def new_schedule_handler(request, group): title = request & get_arg('title') description = request & get_arg('description') new_schedule = create_schedule(title, description, pure(datetime.datetime.now())) object_group = (group & get_group & (lambda group: group.add_schedule(new_schedule.execute)) ).attempt() & aduit_flow return object_group
def group_handler(request, group): flow = (group & get_group & (lambda x: x.invite_key) & (lambda x: (x == request.execute.raw_args['invite_key']))) is_available_code = (flow & aduit_flow).execute if is_available_code: flow = (group & (lambda x: GroupManager().find_group(x)) & (lambda x: x.urgent_schedule) & (lambda x: text(x.rendered_html) if isinstance(x, Schedule) else text(x))) result = flow.attempt() return result & aduit_flow else: return pure(text("Error"))
def group_page_handler(request, group): return pure(html(group_page))
def main_page_handler(request): return pure(html(main_page))