moo.core.models.verb.URLField
- class moo.core.models.verb.URLField(*args, db_collation=None, **kwargs)
- __init__(*args, db_collation=None, **kwargs)
Methods
__init__(*args[, db_collation])cast_db_type(connection)Return the data type to use in the Cast() function.
check(**kwargs)clean(value, model_instance)Convert the value's type and run validation.
clone()Uses deconstruct() to clone a new copy of this Field.
contribute_to_class(cls, name[, private_only])Register the field with the model class it belongs to.
db_check(connection)Return the database column check constraint for this field, for the provided connection.
db_parameters(connection)Extension of db_type(), providing a range of different return values (type, checks).
db_type(connection)Return the database column data type for this field, for the provided connection.
db_type_parameters(connection)db_type_suffix(connection)deconstruct()Return enough information to recreate the field as a 4-tuple:
formfield(**kwargs)Return a django.forms.Field instance for this field.
get_attname()get_attname_column()get_choices([include_blank, blank_choice, ...])Return choices with a default blank choices included, for use as <select> choices for this field.
get_class_lookups()get_col(alias[, output_field])get_db_converters(connection)get_db_prep_save(value, connection)Return field's value prepared for saving into a database.
get_db_prep_value(value, connection[, prepared])Return field's value prepared for interacting with the database backend.
get_default()Return the default value for this field.
get_filter_kwargs_for_object(obj)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.
get_instance_lookups()get_internal_type()get_lookup(lookup_name)get_lookups()get_pk_value_on_save(instance)Hook to generate new PK values on save.
get_prep_value(value)Perform preliminary non-db specific value checks and conversions.
get_transform(lookup_name)has_default()Return a boolean of whether this field has a default value.
merge_dicts(dicts)Merge dicts in reverse to preference the order of the original list.
pre_save(model_instance, add)Return field's value just before saving.
register_class_lookup(lookup[, lookup_name])register_instance_lookup(lookup[, lookup_name])register_lookup([lookup_name])rel_db_type(connection)Return the data type that a related field pointing to this field should use.
run_validators(value)save_form_data(instance, data)select_format(compiler, sql, params)Custom format for select clauses.
set_attributes_from_name(name)to_python(value)Convert the input value into the expected Python data type, raising django.core.exceptions.ValidationError if the data can't be converted.
validate(value, model_instance)Validate value and raise ValidationError if necessary.
value_from_object(obj)Return the value of this field in the given model instance.
value_to_string(obj)Return a string value of this field from the passed obj.
Attributes
auto_creation_countercached_colchoicesclass_lookupscreation_counterdb_returningPrivate API intended only to be used by Django itself.
db_tablespacedefault_error_messagesdefault_validatorsdescriptionempty_strings_allowedempty_valueserror_messagesflatchoicesFlattened version of choices tuple.
generatedhiddenmany_to_manymany_to_onenon_db_attrsone_to_manyone_to_onerelated_modelsystem_check_deprecated_detailssystem_check_removed_detailsuniquevalidatorsSome validators can't be created at field initialization time.