def put(self,request,app_label=None,actor=None): ui = settings.LINO.ui rpt = requested_actor(app_label,actor) #~ rpt = actors.get_actor2(app_label,actor) PUT = http.QueryDict(request.body) # raw_post_data before Django 1.4 gc = dict( widths = [int(x) for x in PUT.getlist(ext_requests.URL_PARAM_WIDTHS)], columns = [str(x) for x in PUT.getlist(ext_requests.URL_PARAM_COLUMNS)], hiddens=[(x == 'true') for x in PUT.getlist(ext_requests.URL_PARAM_HIDDENS)], #~ hidden_cols=[str(x) for x in PUT.getlist('hidden_cols')], ) filter = PUT.get('filter',None) if filter is not None: filter = json.loads(filter) gc['filters'] = [ext_requests.dict2kw(flt) for flt in filter] name = PUT.get('name',None) if name is None: name = ext_elems.DEFAULT_GC_NAME else: name = int(name) gc.update(label=PUT.get('label',"Standard")) try: msg = rpt.save_grid_config(name,gc) except IOError,e: msg = _("Error while saving GC for %(table)s: %(error)s") % dict( table=rpt,error=e) return settings.LINO.ui.error(None,msg,alert=True)