mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-10 05:51:53 +08:00
add value_to_string method to Field
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 = ...
|
||||
|
||||
@@ -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: ...
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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): ...
|
||||
|
||||
Reference in New Issue
Block a user