Implements field exists check for debugging purposes.

        :param field_name:
        :return:
770713
def check_field_exists(self, field_name):
        
        if not settings.DEBUG:
            return

        try:
            self.lookup_opts.get_field(field_name)

        except FieldDoesNotExist as e:
            raise AdmirarchyConfigurationError(e)
1368876
def has_field(cls, field_name):
        
        if super(ModelWithDynamicFieldMixin, cls).has_field(field_name):
            return True

        try:
            cls._get_dynamic_field_for(field_name)
        except ValueError:
            return False
        else:
            return True
103720
def has_field(mc, field_name):
    
    try:
        mc._meta.get_field(field_name)
    except FieldDoesNotExist:
        return False
    return True
219858
def exists(cls, **kwargs):
        
        if not kwargs:
            raise ValueError(u"`Exists` method requires at least one kwarg.")

        # special case to check for a simple pk
        if len(kwargs) == 1 and cls._field_is_pk(list(kwargs.keys())[0]):
            return cls.get_field('pk').exists(list(kwargs.values())[0])

        # get only the first element of the unsorted collection (the fastest)
        try:
            cls.collection(**kwargs).sort(by='nosort')[0]
        except IndexError:
            return False
        else:
            return True
498932
def get_if_present(self, name, default=None):
        
        if not self.processed_data:
            raise exceptions.FormNotProcessed('The form data has not been processed yet')

        if name in self.field_dict:
            return self[name]

        return default
1316090
def has_field(idx, name = nil, opts={})
      set_index_for(name, idx) if name
      set_field_attributes(idx, { :name => name,
                                  :type => opts[:type] || :string,
                                  :default => opts[:default]})

      @field_count ||= 0
      @field_count = [@field_count, idx].max

      return unless name

      define_method :"#{name}=" do |val|
        @fields ||= {}
        @fields[idx] = val
      end

      define_method :"#{name}" do
        field_attrs = self.class.get_field_attributes(idx)
        val = (@fields || {})[idx]
        converter = CONVERSION_WRITER[field_attrs[:type]] if field_attrs
        val = converter.call(val) if converter
        val
      end
    end
1230126
def has_changed(self, field_name: str = None) -> bool:
        
        changed = self._diff_with_initial.keys()

        if self._meta.get_field(field_name).get_internal_type() == 'ForeignKey':
            if not field_name.endswith('_id'):
                field_name = field_name+'_id'

        if field_name in changed:
            return True

        return False
1118881
def get_method_returning_field_value(self, field_name):
        
        method = getattr(self, field_name, None)
        return method if method and callable(method) else None
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
427578
def template_exists(template_name):
    '''
    
    '''
    try:
        template.loader.get_template(template_name)
        return True
    except template.TemplateDoesNotExist:
        return False
541200
@Check(CheckType.FAST)
	public void checkFieldName(SarlField field) {
		final JvmField inferredType = this.associations.getJvmField(field);
		final QualifiedName name = Utils.getQualifiedName(inferredType);
		if (this.featureNames.isDisallowedName(name)) {
			final String validName = Utils.fixHiddenMember(field.getName());
			error(MessageFormat.format(
					Messages.SARLValidator_41,
					field.getName()),
					field,
					XTEND_FIELD__NAME,
					ValidationMessageAcceptor.INSIGNIFICANT_INDEX,
					VARIABLE_NAME_DISALLOWED,
					validName);
		} else if (this.grammarAccess.getOccurrenceKeyword().equals(field.getName())) {
			error(MessageFormat.format(
					Messages.SARLValidator_41,
					this.grammarAccess.getOccurrenceKeyword()),
					field,
					XTEND_FIELD__NAME,
					ValidationMessageAcceptor.INSIGNIFICANT_INDEX,
					VARIABLE_NAME_DISALLOWED);
		}
	}
1140027
def exists(self, record_key):
        
        ''' 
            
        '''
        
        title = '%s.exists' % self.__class__.__name__
    
    # validate inputs
        input_fields = {
            'record_key': record_key
        }
        for key, value in input_fields.items():
            object_title = '%s(%s=%s)' % (title, key, str(value))
            self.fields.validate(value, '.%s' % key, object_title)
    
    # read record headers
        record_status = self.s3.read_headers(self.bucket_name, record_key)
        if record_status:
            return True
        return False
160114
def table_exists?(name)
      return false unless name
      schema ? @connection.table_exists?(name, schema) : @connection.table_exists?(name)
    end
1359523
def validate_presence_of(field_name, type)
      type || raise(::ArgumentError, I18n.t('errors.invalid.type_required', field_name: field_name))
    end
417651
public static MemberExistsResult fieldExists(String fieldName, JavacNode node) {
		node = upToTypeNode(node);
		
		if (node != null && node.get() instanceof JCClassDecl) {
			for (JCTree def : ((JCClassDecl)node.get()).defs) {
				if (def instanceof JCVariableDecl) {
					if (((JCVariableDecl)def).name.contentEquals(fieldName)) {
						return getGeneratedBy(def) == null ? MemberExistsResult.EXISTS_BY_USER : MemberExistsResult.EXISTS_BY_LOMBOK;
					}
				}
			}
		}
		
		return MemberExistsResult.NOT_EXISTS;
	}
3406
def graphHasField(self, graph_name, field_name):
        
        graph = self._graphDict.get(graph_name, True)
        return graph.hasField(field_name)
1210513
def get_field_name(self, field):
        
        for field_name, f in self.fields.items():
            if f == field:
                return field_name
        raise AttributeError("Field %s does not exists in %s resource" % (
            field, self.__class__))