def _get_overrides_for_ccx(ccx):
 overrides_cache = request_cache.get_cache('ccx-overrides')
 if (ccx not in overrides_cache):
  overrides = {}
  query = CcxFieldOverride.objects.filter(ccx=ccx)
  for override in query:
   block_overrides = overrides.setdefault(override.location, {})
   block_overrides[override.field] = json.loads(override.value)
   block_overrides[(override.field + '_id')] = override.id
   block_overrides[(override.field + '_instance')] = override
  overrides_cache[ccx] = overrides
 return overrides_cache[ccx]

def _get_overrides_for_ccx ( ccx ) : overrides_cache = request_cache . get_cache ( 'ccx-overrides' ) if ( ccx not in overrides_cache ) : overrides = { } query = CcxFieldOverride . objects . filter ( ccx = ccx ) for override in query : block_overrides = overrides . setdefault ( override . location , { } ) block_overrides [ override . field ] = json . loads ( override . value ) block_overrides [ ( override . field + '_id' ) ] = override . id block_overrides [ ( override . field + '_instance' ) ] = override overrides_cache [ ccx ] = overrides return overrides_cache [ ccx ]
returns a dictionary mapping field name to overriden value for any overrides set on this block for this ccx .