def prepare_cell(argname='cut', target='cell', restrict=False):
 converters = {'time': CalendarMemberConverter(workspace.calendar)}
 cuts = []
 for cut_string in request.args.getlist(argname):
  cuts += cuts_from_string(g.cube, cut_string, role_member_converters=converters)
 if cuts:
  cell = Cell(g.cube, cuts)
 else:
  cell = None
 if restrict:
  if workspace.authorizer:
   cell = workspace.authorizer.restricted_cell(g.auth_identity, cube=g.cube, cell=cell)
 setattr(g, target, cell)

def prepare_cell ( argname = 'cut' , target = 'cell' , restrict = False ) : converters = { 'time' : CalendarMemberConverter ( workspace . calendar ) } cuts = [ ] for cut_string in request . args . getlist ( argname ) : cuts += cuts_from_string ( g . cube , cut_string , role_member_converters = converters ) if cuts : cell = Cell ( g . cube , cuts ) else : cell = None if restrict : if workspace . authorizer : cell = workspace . authorizer . restricted_cell ( g . auth_identity , cube = g . cube , cell = cell ) setattr ( g , target , cell )
sets g .