|
|
__init__(self,
verbose_name=None,
name=None,
primary_key=False,
max_length=None,
unique=False,
blank=False,
null=False,
db_index=False,
core=False,
rel=None,
default=NOT_PROVIDED,
editable=True,
serialize=True,
prepopulate_from=None,
unique_for_date=None,
unique_for_month=None,
unique_for_year=None,
validator_list=None,
choices=None,
radio_admin=None,
help_text='',
db_column=None,
db_tablespace=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature |
source code
|
|
|
|
|
|
|
to_python(self,
value)
Converts the input value into the expected Python data type, raising
validators.ValidationError if the data can't be converted. |
source code
|
|
|
|
db_type(self)
Returns the database column data type for this field, taking into
account the DATABASE_ENGINE setting. |
source code
|
|
|
|
|
|
|
validate(self,
field_data,
all_data)
Raises validators.ValidationError if field_data has any errors. |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pre_save(self,
model_instance,
add)
Returns field's value just before saving. |
source code
|
|
|
|
get_db_prep_save(self,
value)
Returns field's value prepared for saving into a database. |
source code
|
|
|
|
get_db_prep_lookup(self,
lookup_type,
value)
Returns field's value prepared for database lookup. |
source code
|
|
|
|
has_default(self)
Returns a boolean of whether this field has a default value. |
source code
|
|
|
|
get_default(self)
Returns the default value for this field. |
source code
|
|
|
|
get_manipulator_field_names(self,
name_prefix)
Returns a list of field names that this object adds to the
manipulator. |
source code
|
|
|
|
| prepare_field_objs_and_params(self,
manipulator,
name_prefix) |
source code
|
|
|
|
get_manipulator_fields(self,
opts,
manipulator,
change,
name_prefix='',
rel=False,
follow=True)
Returns a list of oldforms.FormField instances for this field. |
source code
|
|
|
|
|
|
|
get_manipulator_new_data(self,
new_data,
rel=False)
Given the full new_data dictionary (from the manipulator), returns
this field's data. |
source code
|
|
|
|
get_choices(self,
include_blank=True,
blank_choice=BLANK_CHOICE_DASH)
Returns a list of tuples used as SelectField choices for this field. |
source code
|
|
|
|
|
|
|
|
|
|
flatten_data(self,
follow,
obj=None)
Returns a dictionary mapping the field's manipulator field names to
its "flattened" string values for the admin view. |
source code
|
|
|
|
|
|
|
| bind(self,
fieldmapping,
original,
bound_field_class) |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
formfield(self,
form_class=forms.CharField,
**kwargs)
Returns a django.newforms.Field instance for this database Field. |
source code
|
|
|
|
value_from_object(self,
obj)
Returns the value of this field in the given model instance. |
source code
|
|
|
Inherited from object:
__delattr__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__repr__,
__setattr__,
__str__
|