add value_to_string method to Field

This commit is contained in:
Maksim Kurnikov
2021-01-20 00:14:15 +03:00
parent f07477260f
commit 0a0e1985d7
5 changed files with 1 additions and 4 deletions

View File

@@ -83,7 +83,6 @@ class GenericRelation(ForeignObject):
def resolve_related_fields(self) -> List[Tuple[PositiveIntegerField, Field]]: ...
def get_path_info(self, filtered_relation: Optional[FilteredRelation] = ...) -> List[PathInfo]: ...
def get_reverse_path_info(self, filtered_relation: None = ...) -> List[PathInfo]: ...
def value_to_string(self, obj: Model) -> str: ...
def get_content_type(self) -> ContentType: ...
def get_extra_restriction(
self, where_class: Type[WhereNode], alias: Optional[str], remote_alias: str

View File

@@ -22,7 +22,6 @@ class JSONField(CheckFieldDefaultMixin, Field):
encoder: Optional[Type[JSONEncoder]] = ...,
**kwargs: Any
) -> None: ...
def value_to_string(self, obj: Any): ...
class KeyTransform(Transform):
operator: str = ...

View File

@@ -10,7 +10,6 @@ class RangeField(models.Field):
range_type: Any = ...
def get_prep_value(self, value: Any): ...
def to_python(self, value: Any): ...
def value_to_string(self, obj: Any): ...
class IntegerRangeField(RangeField):
def __get__(self, instance, owner) -> NumericRange: ...

View File

@@ -142,6 +142,7 @@ class Field(RegisterLookupMixin, Generic[_ST, _GT]):
def cached_col(self) -> Col: ...
def value_from_object(self, obj: Model) -> _GT: ...
def get_attname(self) -> str: ...
def value_to_string(self, obj: Any) -> str: ...
class IntegerField(Field[_ST, _GT]):
_pyi_private_set_type: Union[float, int, str, Combinable]

View File

@@ -14,7 +14,6 @@ class JSONField(CheckFieldDefaultMixin, Field):
decoder: Optional[Callable] = ...,
**kwargs: Any
) -> None: ...
def value_to_string(self, obj: Any): ...
class DataContains(PostgresOperatorLookup): ...
class ContainedBy(PostgresOperatorLookup): ...