fourth iteration

This commit is contained in:
Maxim Kurnikov
2018-08-11 02:23:18 +03:00
parent c6bceb19f4
commit 8cc446150c
113 changed files with 2285 additions and 9835 deletions
+405 -196
View File
@@ -1,13 +1,24 @@
from datetime import date, datetime, time, timedelta
from decimal import Context, Decimal
from typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union
from uuid import UUID
from django.contrib.auth.validators import UnicodeUsernameValidator
from django.core.exceptions import FieldDoesNotExist as FieldDoesNotExist
from django.core.validators import EmailValidator, RegexValidator
from django.core.validators import DecimalValidator
from django.db.backends.sqlite3.base import DatabaseWrapper
from django.db.models.base import Model
from django.db.models.fields.reverse_related import ManyToOneRel
from django.db.models.expressions import Col, CombinedExpression
from django.db.models.fields.files import FieldFile
from django.db.models.fields.reverse_related import ForeignObjectRel
from django.db.models.query import QuerySet
from django.db.models.query_utils import RegisterLookupMixin
from django.forms.fields import (DecimalField, Field, ImageField, IntegerField,
TypedChoiceField, URLField)
from django.db.models.sql.compiler import SQLCompiler, SQLInsertCompiler
from django.forms.fields import (BooleanField, DurationField, EmailField,
Field, FloatField, GenericIPAddressField,
IntegerField, SlugField,
TypedMultipleChoiceField, URLField, UUIDField)
from django.utils.datastructures import DictWrapper
class Empty: ...
@@ -51,99 +62,167 @@ class Field(RegisterLookupMixin):
def __init__(
self,
verbose_name: Optional[str] = ...,
name: None = ...,
name: Optional[str] = ...,
primary_key: bool = ...,
max_length: Optional[int] = ...,
unique: bool = ...,
blank: bool = ...,
null: bool = ...,
db_index: bool = ...,
rel: Optional[ManyToOneRel] = ...,
default: Union[Callable, Type[NOT_PROVIDED]] = ...,
rel: Optional[ForeignObjectRel] = ...,
default: Any = ...,
editable: bool = ...,
serialize: bool = ...,
unique_for_date: Optional[str] = ...,
unique_for_month: Optional[str] = ...,
unique_for_year: Optional[str] = ...,
unique_for_date: None = ...,
unique_for_month: None = ...,
unique_for_year: None = ...,
choices: Optional[
Union[
List[Tuple[str, str]],
List[Tuple[int, str]],
Tuple[Tuple[int, str], Tuple[int, str], Tuple[int, str]],
Tuple[Tuple[str, str], Tuple[str, str]],
List[List[Union[List[List[str]], str]]],
List[
Tuple[
Union[int, str],
Union[
Tuple[
Tuple[str, str],
Tuple[str, str],
Tuple[str, str],
],
Tuple[Tuple[str, str], Tuple[str, str]],
int,
str,
],
]
],
Tuple[
Union[
Tuple[int, Union[int, str]],
Tuple[
str,
Union[Tuple[Tuple[int, str], Tuple[int, str]], str],
],
]
],
]
] = ...,
help_text: str = ...,
db_column: None = ...,
db_column: Optional[str] = ...,
db_tablespace: Optional[str] = ...,
auto_created: bool = ...,
validators: Union[List[RegexValidator], Tuple] = ...,
error_messages: Optional[Dict[str, str]] = ...,
validators: Union[List[Callable], Tuple] = ...,
error_messages: None = ...,
) -> None: ...
def check(self, **kwargs: Any): ...
def get_col(self, alias: Any, output_field: Optional[Any] = ...): ...
def cached_col(self): ...
def select_format(self, compiler: Any, sql: Any, params: Any): ...
def check(self, **kwargs: Any) -> List[Any]: ...
def get_col(
self,
alias: str,
output_field: Optional[Union[Field, ForeignObjectRel]] = ...,
) -> Col: ...
def cached_col(self) -> Col: ...
def select_format(
self, compiler: SQLCompiler, sql: str, params: List[Union[int, str]]
) -> Tuple[str, List[Union[int, str]]]: ...
def deconstruct(
self
) -> Union[
Tuple[None, str, List[Any], Dict[str, Union[List[Callable], int, str]]],
Tuple[
str,
List[Any],
Union[
Dict[str, Union[int, List[RegexValidator], Dict[str, str]]],
Dict[str, Union[bool, List[Tuple[int, str]]]],
Dict[str, Union[Callable, List[Tuple[int, str]]]],
Dict[str, int],
Dict[str, Optional[bool]],
Dict[str, Union[Callable, int, str]],
Dict[str, Union[List[Tuple[int, str]], int]],
Dict[
str,
Union[
List[
Tuple[
str,
Union[
Tuple[Tuple[str, str], Tuple[str, str]], str
],
]
],
int,
],
],
Dict[str, Union[List[Tuple[str, str]], int]],
Dict[str, Union[List[UnicodeUsernameValidator], int, str]],
Dict[str, float],
],
Union[
Dict[str, Union[int, List[RegexValidator], Dict[str, str]]],
Dict[str, Union[bool, List[Tuple[int, str]]]],
Dict[str, Union[Callable, List[Tuple[int, str]]]],
Dict[str, int],
Dict[Any, Any],
Dict[str, Optional[bool]],
Dict[str, Union[Callable, int, str]],
Dict[str, Union[List[Tuple[int, str]], int]],
Dict[
str,
Union[
List[
Tuple[
str,
Union[
Tuple[Tuple[str, str], Tuple[str, str]], str
],
]
],
int,
],
],
Dict[str, Union[List[Tuple[str, str]], int]],
Dict[str, Union[List[UnicodeUsernameValidator], int, str]],
Dict[str, float],
],
],
Tuple[
str,
List[Any],
Union[
Dict[str, Union[int, Callable, List[Tuple[str, str]]]],
Dict[str, Union[Callable, List[Tuple[int, str]]]],
Dict[str, Union[int, List[RegexValidator], Dict[str, str]]],
Dict[str, Optional[bool]],
Dict[str, Union[List[Tuple[int, str]], str]],
],
Union[
Dict[str, Union[int, Callable, List[Tuple[str, str]]]],
Dict[str, Union[Callable, List[Tuple[int, str]]]],
Dict[str, Union[int, List[RegexValidator], Dict[str, str]]],
Dict[str, List[Tuple[int, str]]],
Dict[str, Optional[bool]],
Dict[str, Union[List[Tuple[int, str]], str]],
],
],
]: ...
def clone(self) -> Field: ...
def __eq__(self, other: CharField) -> bool: ...
def __eq__(self, other: Field) -> bool: ...
def __lt__(self, other: Field) -> bool: ...
def __hash__(self): ...
def __deepcopy__(self, memodict: Dict[Any, Any]) -> Field: ...
def __hash__(self) -> int: ...
def __deepcopy__(
self,
memodict: Union[
Dict[int, Any],
Dict[int, Union[Dict[str, Field], List[Field], Field]],
],
) -> Field: ...
def __copy__(self) -> Field: ...
def __reduce__(self): ...
def get_pk_value_on_save(self, instance: Model) -> None: ...
def to_python(self, value: Any): ...
def validators(
self
) -> Union[List[RegexValidator], List[EmailValidator]]: ...
def run_validators(self, value: Any): ...
def validate(self, value: Any, model_instance: Any): ...
def clean(self, value: Any, model_instance: Any): ...
def db_type_parameters(self, connection: Any): ...
def db_check(self, connection: Any): ...
def db_type(self, connection: Any): ...
def rel_db_type(self, connection: Any): ...
def get_pk_value_on_save(self, instance: Model) -> Optional[UUID]: ...
def to_python(self, value: FieldFile) -> FieldFile: ...
def validators(self) -> List[Callable]: ...
def run_validators(self, value: Any) -> None: ...
def validate(self, value: Any, model_instance: Optional[Model]) -> None: ...
def clean(self, value: Any, model_instance: Optional[Model]) -> Any: ...
def db_type_parameters(
self, connection: DatabaseWrapper
) -> DictWrapper: ...
def db_check(self, connection: DatabaseWrapper) -> None: ...
def db_type(self, connection: DatabaseWrapper) -> str: ...
def rel_db_type(self, connection: DatabaseWrapper) -> str: ...
def cast_db_type(self, connection: Any): ...
def db_parameters(self, connection: Any): ...
def db_type_suffix(self, connection: Any): ...
def get_db_converters(self, connection: Any): ...
def db_parameters(
self, connection: DatabaseWrapper
) -> Dict[str, Optional[str]]: ...
def db_type_suffix(self, connection: DatabaseWrapper) -> Optional[str]: ...
def get_db_converters(
self, connection: DatabaseWrapper
) -> List[Callable]: ...
@property
def unique(self): ...
def unique(self) -> bool: ...
@property
def db_tablespace(self) -> str: ...
concrete: Any = ...
@@ -155,75 +234,116 @@ class Field(RegisterLookupMixin):
def get_filter_kwargs_for_object(self, obj: Any): ...
def get_attname(self) -> str: ...
def get_attname_column(self) -> Tuple[str, str]: ...
def get_internal_type(self): ...
def pre_save(self, model_instance: Model, add: bool) -> Union[str, int]: ...
def get_prep_value(self, value: Any): ...
def get_internal_type(self) -> str: ...
def pre_save(self, model_instance: Model, add: bool) -> Any: ...
def get_prep_value(self, value: Any) -> Any: ...
def get_db_prep_value(
self, value: int, connection: DatabaseWrapper, prepared: bool = ...
) -> int: ...
def get_db_prep_save(self, value: Any, connection: Any): ...
self, value: Any, connection: DatabaseWrapper, prepared: bool = ...
) -> Optional[Union[bytes, float, str]]: ...
def get_db_prep_save(
self, value: Any, connection: DatabaseWrapper
) -> Optional[Union[float, memoryview, str]]: ...
def has_default(self) -> bool: ...
def get_default(self): ...
def get_default(self) -> Any: ...
def get_choices(
self,
include_blank: bool = ...,
blank_choice: List[Tuple[str, str]] = ...,
limit_choices_to: None = ...,
) -> List[Tuple[str, str]]: ...
def value_to_string(self, obj: Any): ...
limit_choices_to: Optional[Dict[str, QuerySet]] = ...,
) -> List[
Union[
Tuple[
Union[
Tuple[Tuple[str, str], Tuple[str, str], Tuple[str, str]],
Tuple[Tuple[str, str], Tuple[str, str]],
str,
],
Union[
Tuple[Tuple[str, str], Tuple[str, str], Tuple[str, str]],
Tuple[Tuple[str, str], Tuple[str, str]],
str,
],
],
Tuple[int, int],
]
]: ...
def value_to_string(self, obj: Model) -> str: ...
flatchoices: Any = ...
def save_form_data(self, instance: Any, data: Any) -> None: ...
def save_form_data(
self, instance: Model, data: Optional[Union[date, Model, float, str]]
) -> None: ...
def formfield(
self,
form_class: Type[Union[IntegerField, URLField, ImageField]] = ...,
choices_form_class: None = ...,
form_class: Optional[Type[Any]] = ...,
choices_form_class: Optional[Type[TypedMultipleChoiceField]] = ...,
**kwargs: Any
) -> Field: ...
def value_from_object(self, obj: Any): ...
def value_from_object(self, obj: Model) -> Any: ...
class AutoField(Field):
description: Any = ...
empty_strings_allowed: bool = ...
default_error_messages: Any = ...
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
def check(self, **kwargs: Any): ...
def deconstruct(self): ...
def get_internal_type(self): ...
def to_python(self, value: Any): ...
def rel_db_type(self, connection: Any): ...
def check(self, **kwargs: Any) -> List[Any]: ...
def deconstruct(
self
) -> Union[
Tuple[
str,
List[Any],
Dict[str, Union[bool, str]],
Dict[str, Union[bool, str]],
],
Tuple[str, str, List[Any], Dict[str, bool]],
]: ...
def get_internal_type(self) -> str: ...
def to_python(self, value: Union[int, str]) -> int: ...
def rel_db_type(self, connection: DatabaseWrapper) -> str: ...
def validate(self, value: Any, model_instance: Any) -> None: ...
def get_db_prep_value(
self, value: Any, connection: Any, prepared: bool = ...
): ...
def get_prep_value(self, value: Any): ...
self,
value: Union[int, str],
connection: DatabaseWrapper,
prepared: bool = ...,
) -> Union[int, str]: ...
def get_prep_value(
self, value: Optional[Union[int, str]]
) -> Optional[int]: ...
def contribute_to_class(
self, cls: Type[Model], name: str, **kwargs: Any
) -> None: ...
def formfield(self, **kwargs: Any): ...
def formfield(self, **kwargs: Any) -> None: ...
class BigAutoField(AutoField):
description: Any = ...
def get_internal_type(self): ...
def rel_db_type(self, connection: Any): ...
def get_internal_type(self) -> str: ...
def rel_db_type(self, connection: DatabaseWrapper) -> str: ...
class BooleanField(Field):
empty_strings_allowed: bool = ...
default_error_messages: Any = ...
description: Any = ...
def get_internal_type(self): ...
def to_python(self, value: Any): ...
def get_prep_value(self, value: Any): ...
def formfield(self, **kwargs: Any): ...
def get_internal_type(self) -> str: ...
def to_python(self, value: Optional[Union[bool, str]]) -> bool: ...
def get_prep_value(
self, value: Optional[Union[bool, str]]
) -> Optional[bool]: ...
def formfield(self, **kwargs: Any) -> BooleanField: ...
class CharField(Field):
description: Any = ...
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
def check(self, **kwargs: Any): ...
def check(self, **kwargs: Any) -> List[Any]: ...
def cast_db_type(self, connection: Any): ...
def get_internal_type(self): ...
def to_python(self, value: Any): ...
def get_prep_value(self, value: Any): ...
def formfield(self, **kwargs: Any) -> URLField: ...
def get_internal_type(self) -> str: ...
def to_python(
self, value: Optional[Union[Model, int, str]]
) -> Optional[str]: ...
def get_prep_value(
self, value: Optional[Union[Model, str]]
) -> Optional[str]: ...
def formfield(self, **kwargs: Any) -> Field: ...
class CommaSeparatedIntegerField(CharField):
default_validators: Any = ...
@@ -231,7 +351,7 @@ class CommaSeparatedIntegerField(CharField):
system_check_removed_details: Any = ...
class DateTimeCheckMixin:
def check(self, **kwargs: Any): ...
def check(self, **kwargs: Any) -> List[Any]: ...
class DateField(DateTimeCheckMixin, Field):
empty_strings_allowed: bool = ...
@@ -239,39 +359,67 @@ class DateField(DateTimeCheckMixin, Field):
description: Any = ...
def __init__(
self,
verbose_name: Optional[Any] = ...,
name: Optional[Any] = ...,
verbose_name: Optional[str] = ...,
name: None = ...,
auto_now: bool = ...,
auto_now_add: bool = ...,
**kwargs: Any
) -> None: ...
def deconstruct(self): ...
def get_internal_type(self): ...
def to_python(self, value: Any): ...
def pre_save(self, model_instance: Any, add: Any): ...
def deconstruct(
self
) -> Union[
Tuple[
str,
List[Any],
Dict[str, Union[Callable, int, str]],
Dict[str, Union[Callable, int, str]],
],
Tuple[str, str, List[Any], Dict[str, int]],
]: ...
def get_internal_type(self) -> str: ...
def to_python(
self, value: Optional[Union[date, str]]
) -> Optional[date]: ...
def pre_save(
self, model_instance: Model, add: bool
) -> Optional[Union[date, CombinedExpression]]: ...
def contribute_to_class(
self, cls: Type[Model], name: str, **kwargs: Any
) -> None: ...
def get_prep_value(self, value: Any): ...
def get_prep_value(
self, value: Optional[Union[date, str]]
) -> Optional[date]: ...
def get_db_prep_value(
self, value: Any, connection: Any, prepared: bool = ...
): ...
def value_to_string(self, obj: Any): ...
def formfield(self, **kwargs: Any): ...
self,
value: Optional[date],
connection: DatabaseWrapper,
prepared: bool = ...,
) -> Optional[str]: ...
def value_to_string(self, obj: Model) -> str: ...
def formfield(self, **kwargs: Any) -> Field: ...
class DateTimeField(DateField):
empty_strings_allowed: bool = ...
default_error_messages: Any = ...
description: Any = ...
def get_internal_type(self): ...
def to_python(self, value: Any): ...
def pre_save(self, model_instance: Any, add: Any): ...
def get_prep_value(self, value: Any): ...
def get_internal_type(self) -> str: ...
def to_python(
self, value: Optional[Union[datetime, str]]
) -> Optional[datetime]: ...
def pre_save(
self, model_instance: Model, add: bool
) -> Optional[Union[datetime, CombinedExpression]]: ...
def get_prep_value(
self, value: Optional[datetime]
) -> Optional[datetime]: ...
def get_db_prep_value(
self, value: Any, connection: Any, prepared: bool = ...
): ...
def value_to_string(self, obj: Any): ...
def formfield(self, **kwargs: Any): ...
self,
value: Optional[datetime],
connection: DatabaseWrapper,
prepared: bool = ...,
) -> Optional[str]: ...
def value_to_string(self, obj: Model) -> str: ...
def formfield(self, **kwargs: Any) -> Field: ...
class DecimalField(Field):
empty_strings_allowed: bool = ...
@@ -279,62 +427,64 @@ class DecimalField(Field):
description: Any = ...
def __init__(
self,
verbose_name: Optional[Any] = ...,
name: Optional[Any] = ...,
max_digits: Optional[Any] = ...,
decimal_places: Optional[Any] = ...,
verbose_name: None = ...,
name: None = ...,
max_digits: Optional[int] = ...,
decimal_places: Optional[int] = ...,
**kwargs: Any
) -> None: ...
def check(self, **kwargs: Any): ...
def validators(self): ...
def context(self): ...
def deconstruct(self): ...
def get_internal_type(self): ...
def to_python(self, value: Any): ...
def get_db_prep_save(self, value: Any, connection: Any): ...
def get_prep_value(self, value: Any): ...
def formfield(self, **kwargs: Any) -> DecimalField: ...
def check(self, **kwargs: Any) -> List[Any]: ...
def validators(self) -> List[DecimalValidator]: ...
def context(self) -> Context: ...
def deconstruct(
self
) -> Tuple[str, List[Any], Dict[str, int], Dict[str, int]]: ...
def get_internal_type(self) -> str: ...
def to_python(self, value: Optional[str]) -> Optional[Decimal]: ...
def get_db_prep_save(
self, value: Optional[str], connection: DatabaseWrapper
) -> Optional[str]: ...
def get_prep_value(self, value: None) -> None: ...
def formfield(self, **kwargs: Any): ...
class DurationField(Field):
empty_strings_allowed: bool = ...
default_error_messages: Any = ...
description: Any = ...
def get_internal_type(self): ...
def to_python(self, value: Any): ...
def get_internal_type(self) -> str: ...
def to_python(self, value: str) -> timedelta: ...
def get_db_prep_value(
self, value: Any, connection: Any, prepared: bool = ...
): ...
def get_db_converters(self, connection: Any): ...
def value_to_string(self, obj: Any): ...
def formfield(self, **kwargs: Any): ...
def value_to_string(self, obj: Model) -> str: ...
def formfield(self, **kwargs: Any) -> DurationField: ...
class EmailField(CharField):
default_validators: Any = ...
description: Any = ...
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
def deconstruct(self): ...
def formfield(self, **kwargs: Any): ...
def deconstruct(
self
) -> Tuple[str, List[Any], Dict[str, int], Dict[str, int]]: ...
def formfield(self, **kwargs: Any) -> EmailField: ...
class FilePathField(Field):
description: Any = ...
def __init__(
self,
verbose_name: None = ...,
name: None = ...,
verbose_name: Optional[Any] = ...,
name: Optional[Any] = ...,
path: str = ...,
match: str = ...,
match: Optional[Any] = ...,
recursive: bool = ...,
allow_files: bool = ...,
allow_folders: bool = ...,
**kwargs: Any
) -> None: ...
def check(self, **kwargs: Any): ...
def deconstruct(
self
) -> Tuple[
str, List[Any], Dict[str, Union[str, bool]], Dict[str, Union[str, bool]]
]: ...
def get_prep_value(self, value: Any): ...
def deconstruct(self): ...
def get_prep_value(self, value: Optional[str]) -> Optional[str]: ...
def formfield(self, **kwargs: Any): ...
def get_internal_type(self): ...
@@ -342,37 +492,39 @@ class FloatField(Field):
empty_strings_allowed: bool = ...
default_error_messages: Any = ...
description: Any = ...
def get_prep_value(self, value: Any): ...
def get_internal_type(self): ...
def to_python(self, value: Any): ...
def formfield(self, **kwargs: Any): ...
def get_prep_value(self, value: Union[float, str]) -> float: ...
def get_internal_type(self) -> str: ...
def to_python(self, value: Union[float, str]) -> float: ...
def formfield(self, **kwargs: Any) -> FloatField: ...
class IntegerField(Field):
empty_strings_allowed: bool = ...
default_error_messages: Any = ...
description: Any = ...
def check(self, **kwargs: Any): ...
def validators(self): ...
def get_prep_value(self, value: Any): ...
def get_internal_type(self): ...
def to_python(self, value: Any): ...
def check(self, **kwargs: Any) -> List[Any]: ...
def validators(self) -> List[Any]: ...
def get_prep_value(
self, value: Optional[Union[int, str]]
) -> Optional[int]: ...
def get_internal_type(self) -> str: ...
def to_python(self, value: Union[int, str]) -> int: ...
def formfield(self, **kwargs: Any) -> Field: ...
class BigIntegerField(IntegerField):
empty_strings_allowed: bool = ...
description: Any = ...
MAX_BIGINT: int = ...
def get_internal_type(self): ...
def formfield(self, **kwargs: Any) -> IntegerField: ...
def get_internal_type(self) -> str: ...
def formfield(self, **kwargs: Any): ...
class IPAddressField(Field):
empty_strings_allowed: bool = ...
description: Any = ...
system_check_removed_details: Any = ...
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
def deconstruct(self): ...
def deconstruct(self) -> Tuple[None, str, List[Any], Dict[str, bool]]: ...
def get_prep_value(self, value: Any): ...
def get_internal_type(self): ...
def get_internal_type(self) -> str: ...
class GenericIPAddressField(Field):
empty_strings_allowed: bool = ...
@@ -392,12 +544,15 @@ class GenericIPAddressField(Field):
def check(self, **kwargs: Any): ...
def deconstruct(self): ...
def get_internal_type(self): ...
def to_python(self, value: Any): ...
def to_python(self, value: Union[Callable, int, str]) -> str: ...
def get_db_prep_value(
self, value: Any, connection: Any, prepared: bool = ...
): ...
def get_prep_value(self, value: Any): ...
def formfield(self, **kwargs: Any): ...
self,
value: Optional[str],
connection: DatabaseWrapper,
prepared: bool = ...,
) -> Optional[str]: ...
def get_prep_value(self, value: Optional[str]) -> Optional[str]: ...
def formfield(self, **kwargs: Any) -> GenericIPAddressField: ...
class NullBooleanField(BooleanField):
default_error_messages: Any = ...
@@ -411,12 +566,12 @@ class PositiveIntegerRelDbTypeMixin:
class PositiveIntegerField(PositiveIntegerRelDbTypeMixin, IntegerField):
description: Any = ...
def get_internal_type(self): ...
def formfield(self, **kwargs: Any) -> TypedChoiceField: ...
def get_internal_type(self) -> str: ...
def formfield(self, **kwargs: Any) -> IntegerField: ...
class PositiveSmallIntegerField(PositiveIntegerRelDbTypeMixin, IntegerField):
description: Any = ...
def get_internal_type(self): ...
def get_internal_type(self) -> str: ...
def formfield(self, **kwargs: Any): ...
class SlugField(CharField):
@@ -431,20 +586,34 @@ class SlugField(CharField):
allow_unicode: bool = ...,
**kwargs: Any
) -> None: ...
def deconstruct(self): ...
def get_internal_type(self): ...
def formfield(self, **kwargs: Any): ...
def deconstruct(
self
) -> Union[
Tuple[
str,
List[Any],
Dict[str, int],
Union[Dict[Any, Any], Dict[str, int]],
],
Tuple[str, str, List[Any], Dict[str, int]],
]: ...
def get_internal_type(self) -> str: ...
def formfield(self, **kwargs: Any) -> SlugField: ...
class SmallIntegerField(IntegerField):
description: Any = ...
def get_internal_type(self): ...
def get_internal_type(self) -> str: ...
class TextField(Field):
description: Any = ...
def get_internal_type(self): ...
def to_python(self, value: Any): ...
def get_prep_value(self, value: Any): ...
def formfield(self, **kwargs: Any): ...
def get_internal_type(self) -> str: ...
def to_python(
self, value: Optional[Union[Dict[Any, Any], int, str]]
) -> Optional[str]: ...
def get_prep_value(
self, value: Optional[Union[Dict[Any, Any], int, str]]
) -> Optional[str]: ...
def formfield(self, **kwargs: Any) -> Field: ...
class TimeField(DateTimeCheckMixin, Field):
empty_strings_allowed: bool = ...
@@ -452,20 +621,31 @@ class TimeField(DateTimeCheckMixin, Field):
description: Any = ...
def __init__(
self,
verbose_name: Optional[Any] = ...,
name: Optional[Any] = ...,
verbose_name: None = ...,
name: None = ...,
auto_now: bool = ...,
auto_now_add: bool = ...,
**kwargs: Any
) -> None: ...
def deconstruct(self): ...
def get_internal_type(self): ...
def to_python(self, value: Any): ...
def pre_save(self, model_instance: Any, add: Any): ...
def get_prep_value(self, value: Any): ...
def deconstruct(
self
) -> Tuple[str, List[Any], Dict[Any, Any], Dict[Any, Any]]: ...
def get_internal_type(self) -> str: ...
def to_python(
self, value: Optional[Union[datetime, time, str]]
) -> Optional[time]: ...
def pre_save(
self, model_instance: Model, add: bool
) -> Optional[datetime]: ...
def get_prep_value(
self, value: Optional[Union[datetime, time]]
) -> Optional[time]: ...
def get_db_prep_value(
self, value: Any, connection: Any, prepared: bool = ...
): ...
self,
value: Optional[Union[datetime, time]],
connection: DatabaseWrapper,
prepared: bool = ...,
) -> Optional[str]: ...
def value_to_string(self, obj: Any): ...
def formfield(self, **kwargs: Any): ...
@@ -473,25 +653,44 @@ class URLField(CharField):
default_validators: Any = ...
description: Any = ...
def __init__(
self,
verbose_name: Optional[Any] = ...,
name: Optional[Any] = ...,
**kwargs: Any
self, verbose_name: None = ..., name: None = ..., **kwargs: Any
) -> None: ...
def deconstruct(self): ...
def formfield(self, **kwargs: Any): ...
def deconstruct(
self
) -> Tuple[
str, List[Any], Dict[str, int], Union[Dict[Any, Any], Dict[str, int]]
]: ...
def formfield(self, **kwargs: Any) -> URLField: ...
class BinaryField(Field):
description: Any = ...
empty_values: Any = ...
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
def deconstruct(self): ...
def get_internal_type(self): ...
def get_placeholder(self, value: Any, compiler: Any, connection: Any): ...
def get_default(self): ...
def deconstruct(
self
) -> Union[
Tuple[
str,
List[Any],
Dict[str, bool],
Union[Dict[Any, Any], Dict[str, bool]],
],
Tuple[str, str, List[Any], Dict[Any, Any]],
]: ...
def get_internal_type(self) -> str: ...
def get_placeholder(
self,
value: Optional[memoryview],
compiler: SQLInsertCompiler,
connection: DatabaseWrapper,
) -> str: ...
def get_default(self) -> bytes: ...
def get_db_prep_value(
self, value: Any, connection: Any, prepared: bool = ...
): ...
self,
value: Optional[bytes],
connection: DatabaseWrapper,
prepared: bool = ...,
) -> Optional[memoryview]: ...
def value_to_string(self, obj: Any): ...
def to_python(self, value: Any): ...
@@ -499,13 +698,23 @@ class UUIDField(Field):
default_error_messages: Any = ...
description: str = ...
empty_strings_allowed: bool = ...
def __init__(
self, verbose_name: Optional[Any] = ..., **kwargs: Any
) -> None: ...
def deconstruct(self): ...
def get_internal_type(self): ...
def __init__(self, verbose_name: None = ..., **kwargs: Any) -> None: ...
def deconstruct(
self
) -> Tuple[
str,
List[Any],
Dict[str, Union[Callable, bool]],
Dict[str, Union[Callable, bool]],
]: ...
def get_internal_type(self) -> str: ...
def get_db_prep_value(
self, value: Any, connection: Any, prepared: bool = ...
): ...
def to_python(self, value: Any): ...
def formfield(self, **kwargs: Any): ...
self,
value: Optional[Union[Dict[Any, Any], List[Any]]],
connection: DatabaseWrapper,
prepared: bool = ...,
) -> None: ...
def to_python(
self, value: Optional[Union[Dict[Any, Any], List[Any], UUID]]
) -> Optional[UUID]: ...
def formfield(self, **kwargs: Any) -> UUIDField: ...