Return the custom field object based on the identifier
8779
public function getCustomFieldObject($postTypeModel, $key)
	{
		$allKeys = $this->getValidationsKeys($postTypeModel);

		if(array_key_exists($key, $allKeys)){
			return $allKeys[$key];
		}

		return false;
	}
340873
def _get_field(instance, field):
    
    
    value = getattr(instance, field)
    if hasattr(value, 'raw'):
        value = value.raw
    return value
746012
function getField(field) {
  return function map(element) {
    if (element) {
      if (Array.isArray(element)) {
        return element.map(map).join('');
      }
      else if (typeof element === 'string') {
        return element;
      }
      else if (typeof element === 'object') {
        return element[field];
      }
    }
    return '';
  };
}
1246726
private static Field getDeclaredField(Object object, String fieldName) throws NoSuchFieldException {
        Assert.notNull(object);
        return getDeclaredField(object.getClass(), fieldName);
    }
1187679
def field_function(self, type_code, func_name):
        """"""
        assert func_name in ('to_json', 'from_json')
        name = "field_%s_%s" % (type_code.lower(), func_name)
        return getattr(self, name)
1247590
def get_field(field):
    """"""
    if isinstance(field, djmodels.fields.Field):
        return field
    elif isinstance(field, basestring):
        field = field.split('.')
        if len(field) == 3:
            model = get_model(app=field[0], model=field[1])
        elif len(field) == 2:
            model = get_model(app=DEFAULT_APP, model=field[0])
        else:
            return None
            raise NotImplementedError("Unknown default model name. Don't know where to look for field %s" % '.'.join(field)) 
        field = model._meta.get_field(field[-1])
    return field
1120035
def get_OID_field(fs):
    """"""
    if arcpyFound == False:
        raise Exception("ArcPy is required to use this function")
    desc = arcpy.Describe(fs)
    if desc.hasOID:
        return desc.OIDFieldName
    return None
292642
def get_proxy_field(self, instance):
        
        proxy_object = self.get_proxy_object(instance)
        if not proxy_object:
            return None
        return proxy_object.getField(self.name)
353688
def format_custom_fields(list_of_custom_fields):
        '''
            
        '''
        output_payload = {}
        if list_of_custom_fields:
            # custom_field: {"name": value}
            for custom_field in list_of_custom_fields:
                for key, value in custom_field.items():
                    output_payload["custom_fields[" + key + "]"] = value
        return output_payload
1195995
def _get_internal_field_by_name(self, name):
        """"""
        field = self._all_fields.get(name, self._all_fields.get('%s.%s' % (self._full_name, name)))
        if field is not None:
            return field
        for field_name in self._all_fields:
            # Specific name
            if field_name.endswith('.%s' % name):
                return self._all_fields[field_name]
341671
def _generate_field_with_default(**kwargs):
        """"""
        field = kwargs['field']
        if callable(field.default):
            return field.default()
        return field.default
736190
function (fieldDefinition) {
		let type = fieldDefinition.fieldType;
		if (typeof type === 'object') {
			type = fieldDefinition.fieldType.type;
		}
		return type;
	}
437949
def get_field_by_name(self, name):
        

        for f in self.fields:
            if f.get_name() == name:
                return f
        return None
629890
def lookupFieldTypeByName( fieldName )
      type = ""
      fid = lookupFieldIDByName( fieldName )
      field = lookupField( fid ) if fid
      type = field.attributes[ "field_type" ] if field
      type
   end
821838
def get_prepopulated_value(field, instance):
    
    if hasattr(field.populate_from, '__call__'):
        # AutoSlugField(populate_from=lambda instance: ...)
        return field.populate_from(instance)
    else:
        # AutoSlugField(populate_from='foo')
        attr = getattr(instance, field.populate_from)
        return callable(attr) and attr() or attr
958211
def custom_field_rendering(context, field, *args, **kwargs):
    
    if CUSTOM_FIELD_RENDERER:
        mod, cls = CUSTOM_FIELD_RENDERER.rsplit(".", 1)
        field_renderer = getattr(import_module(mod), cls)
        if field_renderer:
            return field_renderer(field, **kwargs).render()
    return field
1309468
def get_class_field(cls, field_name):
        
        if not cls.has_field(field_name):
            raise AttributeError('"%s" is not a field for the model "%s"' %
                                 (field_name, cls.__name__))

        field = getattr(cls, '_redis_attr_%s' % field_name)

        return field