MCPcopy
hub / github.com/django/django / has_db_default

Method has_db_default

django/db/models/fields/__init__.py:1057–1059  ·  view source on GitHub ↗

Return a boolean of whether this field has a db_default value.

(self)

Source from the content-addressed store, hash-verified

1055 return self.default is not NOT_PROVIDED
1056
1057 def has_db_default(self):
1058 """Return a boolean of whether this field has a db_default value."""
1059 return self.db_default is not NOT_PROVIDED
1060
1061 def get_default(self):
1062 """Return the default value for this field."""

Callers 15

_check_db_defaultMethod · 0.95
db_returningMethod · 0.95
_get_defaultMethod · 0.95
_remake_tableMethod · 0.80
add_fieldMethod · 0.80
_set_field_new_typeMethod · 0.80
_iter_column_sqlMethod · 0.80
add_fieldMethod · 0.80
_alter_fieldMethod · 0.80
_generate_added_fieldMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected