class documentation

Undocumented

Method formfield Return a django.forms.Field instance for this field.
Method get_internal_type Undocumented
Class Variable description Undocumented

Inherited from PositiveIntegerRelDbTypeMixin:

Method __init_subclass__ Undocumented
Method rel_db_type Return the data type that a related field pointing to this field should use. In most cases, a foreign key pointing to a positive integer primary key will have an integer column data type but some databases (e...

Inherited from BigIntegerField (via PositiveIntegerRelDbTypeMixin):

Constant MAX_BIGINT Undocumented

Inherited from IntegerField (via PositiveIntegerRelDbTypeMixin, BigIntegerField):

Method check Undocumented
Method get_prep_value Perform preliminary non-db specific value checks and conversions.
Method to_python Convert the input value into the expected Python data type, raising django.core.exceptions.ValidationError if the data can't be converted. Return the converted value. Subclasses should override this.
Class Variable default_error_messages Undocumented
Class Variable empty_strings_allowed Undocumented
Property validators Some validators can't be created at field initialization time. This method provides a way to delay their creation until required.
Method _check_max_length_warning Undocumented

Inherited from Field (via PositiveIntegerRelDbTypeMixin, BigIntegerField, IntegerField):

Method __copy__ Undocumented
Method __deepcopy__ Undocumented
Method __eq__ Undocumented
Method __hash__ Undocumented
Method __init__ Undocumented
Method __lt__ Undocumented
Method __reduce__ Pickling should return the model._meta.fields instance of the field, not a new copy of that field. So, use the app registry to load the model and then the field back.
Method __repr__ Display the module, class, and name of the field.
Method __str__ Return "app_label.model_label.field_name" for fields attached to models.
Method cast_db_type Return the data type to use in the Cast() function.
Method clean Convert the value's type and run validation. Validation errors from to_python() and validate() are propagated. Return the correct value if no error is raised.
Method clone Uses deconstruct() to clone a new copy of this Field. Will not preserve any class attachments/attribute names.
Method contribute_to_class Register the field with the model class it belongs to.
Method db_check Return the database column check constraint for this field, for the provided connection. Works the same way as db_type() for the case that get_internal_type() does not map to a preexisting model field.
Method db_parameters Extension of db_type(), providing a range of different return values (type, checks). This will look at db_type(), allowing custom model fields to override it.
Method db_type Return the database column data type for this field, for the provided connection.
Method db_type_parameters Undocumented
Method db_type_suffix Undocumented
Method deconstruct Return enough information to recreate the field as a 4-tuple:
Method get_attname Undocumented
Method get_attname_column Undocumented
Method get_choices Return choices with a default blank choices included, for use as <select> choices for this field.
Method get_col Undocumented
Method get_db_converters Undocumented
Method get_db_prep_save Return field's value prepared for saving into a database.
Method get_db_prep_value Return field's value prepared for interacting with the database backend.
Method get_default Return the default value for this field.
Method get_filter_kwargs_for_object Return a dict that when passed as kwargs to self.model.filter(), would yield all instances having the same value for this field as obj has.
Method get_pk_value_on_save Hook to generate new PK values on save. This method is called when saving instances with no primary key value set. If this method returns something else than None, then the returned value is used when saving the new instance.
Method has_default Return a boolean of whether this field has a default value.
Method pre_save Return field's value just before saving.
Method run_validators Undocumented
Method save_form_data Undocumented
Method select_format Custom format for select clauses. For example, GIS columns need to be selected as AsText(table.col) on MySQL as the table.col data can't be used by Django.
Method set_attributes_from_name Undocumented
Method validate Validate value and raise ValidationError if necessary. Subclasses should override this to provide validation logic.
Method value_from_object Return the value of this field in the given model instance.
Method value_to_string Return a string value of this field from the passed obj. This is used by the serialization framework.
Class Variable auto_creation_counter Undocumented
Class Variable default_validators Undocumented
Class Variable empty_values Undocumented
Class Variable flatchoices Undocumented
Class Variable hidden Undocumented
Class Variable many_to_many Undocumented
Class Variable many_to_one Undocumented
Class Variable non_db_attrs Undocumented
Class Variable one_to_many Undocumented
Class Variable one_to_one Undocumented
Class Variable related_model Undocumented
Class Variable system_check_deprecated_details Undocumented
Class Variable system_check_removed_details Undocumented
Instance Variable attname Undocumented
Instance Variable auto_created Undocumented
Instance Variable blank Undocumented
Instance Variable choices Undocumented
Instance Variable column Undocumented
Instance Variable concrete Undocumented
Instance Variable creation_counter Undocumented
Instance Variable db_column Undocumented
Instance Variable db_index Undocumented
Instance Variable default Undocumented
Instance Variable editable Undocumented
Instance Variable help_text Undocumented
Instance Variable is_relation Undocumented
Instance Variable max_length Undocumented
Instance Variable model Undocumented
Instance Variable name Undocumented
Instance Variable null Undocumented
Instance Variable primary_key Undocumented
Instance Variable remote_field Undocumented
Instance Variable serialize Undocumented
Instance Variable unique_for_date Undocumented
Instance Variable unique_for_month Undocumented
Instance Variable unique_for_year Undocumented
Instance Variable verbose_name Undocumented
Property cached_col Undocumented
Property db_returning Private API intended only to be used by Django itself. Currently only the PostgreSQL backend supports returning multiple fields on a model.
Property db_tablespace Undocumented
Property error_messages Undocumented
Property unique Undocumented
Class Method _choices_is_value Undocumented
Method _check_backend_specific_checks Undocumented
Method _check_choices Undocumented
Method _check_db_index Undocumented
Method _check_deprecation_details Undocumented
Method _check_field_name Check if field name is valid, i.e. 1) does not end with an underscore, 2) does not contain "__" and 3) is not "pk".
Method _check_null_allowed_for_primary_keys Undocumented
Method _check_validators Undocumented
Method _description Undocumented
Method _get_flatchoices Flattened version of choices tuple.
Instance Variable _db_tablespace Undocumented
Instance Variable _error_messages Undocumented
Instance Variable _unique Undocumented
Instance Variable _validators Undocumented
Instance Variable _verbose_name Undocumented
Property _get_default Undocumented

Inherited from RegisterLookupMixin (via PositiveIntegerRelDbTypeMixin, BigIntegerField, IntegerField, Field):

Class Method get_lookups Undocumented
Class Method register_lookup Undocumented
Static Method merge_dicts Merge dicts in reverse to preference the order of the original list. e.g., merge_dicts([a, b]) will preference the keys in 'a' over those in 'b'.
Method get_lookup Undocumented
Method get_transform Undocumented
Class Method _clear_cached_lookups Undocumented
Class Method _get_lookup Undocumented
Class Method _unregister_lookup Remove given lookup from cls lookups. For use in tests only as it's not thread-safe.
def formfield(self, **kwargs): (source)

Return a django.forms.Field instance for this field.

def get_internal_type(self): (source)