merge with stubgen output

This commit is contained in:
Maxim Kurnikov
2018-07-29 23:25:20 +03:00
parent 496a6274e7
commit 4866354600
294 changed files with 10234 additions and 10842 deletions
+47 -65
View File
@@ -1,81 +1,63 @@
# Stubs for django.forms.boundfield (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any, Optional
from django.forms.fields import Field
from django.forms.forms import Form
from django.forms.models import ModelForm
from django.forms.renderers import DjangoTemplates
from django.forms.utils import ErrorList
from django.forms.widgets import (
ChoiceWidget,
HiddenInput,
SplitHiddenDateTimeWidget,
Widget,
)
from django.forms.widgets import ChoiceWidget, HiddenInput, SplitHiddenDateTimeWidget, Widget
from django.utils.safestring import SafeText
from typing import (
Any,
Dict,
List,
Optional,
Union,
)
from typing import Any, Dict, List, Optional, Union
class BoundField:
def __getitem__(
self,
idx: Union[slice, str, int]
) -> Union[List[BoundWidget], BoundWidget]: ...
def __init__(
self,
form: Union[Form, ModelForm],
field: Field,
name: str
) -> None: ...
form: Any = ...
field: Any = ...
name: Any = ...
html_name: Any = ...
html_initial_name: Any = ...
html_initial_id: Any = ...
label: Any = ...
help_text: Any = ...
def __init__(self, form: Union[Form, ModelForm], field: Field, name: str) -> None: ...
def __str__(self): ...
def subwidgets(self) -> List[BoundWidget]: ...
def __bool__(self): ...
def __iter__(self): ...
def __len__(self) -> int: ...
def as_hidden(self, attrs: None = ..., **kwargs) -> SafeText: ...
def as_text(self, attrs: None = ..., **kwargs) -> SafeText: ...
def as_textarea(self, attrs: None = ..., **kwargs) -> SafeText: ...
def as_widget(
self,
widget: Optional[Union[HiddenInput, SplitHiddenDateTimeWidget]] = ...,
attrs: None = ...,
only_initial: bool = ...
) -> SafeText: ...
@property
def auto_id(self) -> str: ...
def build_widget_attrs(
self,
attrs: Dict[str, str],
widget: Optional[Widget] = ...
) -> Dict[str, Union[bool, str]]: ...
def css_classes(self, extra_classes: None = ...) -> str: ...
@property
def data(self) -> Any: ...
def __getitem__(self, idx: Union[slice, str, int]) -> Union[List[BoundWidget], BoundWidget]: ...
@property
def errors(self) -> ErrorList: ...
@cached_property
def initial(self) -> Any: ...
def as_widget(self, widget: Optional[Union[HiddenInput, SplitHiddenDateTimeWidget]] = ..., attrs: None = ..., only_initial: bool = ...) -> SafeText: ...
def as_text(self, attrs: None = ..., **kwargs: Any) -> SafeText: ...
def as_textarea(self, attrs: None = ..., **kwargs: Any) -> SafeText: ...
def as_hidden(self, attrs: None = ..., **kwargs: Any) -> SafeText: ...
@property
def data(self) -> Any: ...
def value(self) -> Any: ...
def label_tag(self, contents: Optional[SafeText] = ..., attrs: Optional[Dict[str, str]] = ..., label_suffix: Optional[str] = ...) -> SafeText: ...
def css_classes(self, extra_classes: None = ...) -> str: ...
@property
def is_hidden(self) -> bool: ...
def label_tag(
self,
contents: Optional[SafeText] = ...,
attrs: Optional[Dict[str, str]] = ...,
label_suffix: Optional[str] = ...
) -> SafeText: ...
@cached_property
def subwidgets(self) -> List[BoundWidget]: ...
def value(self) -> Any: ...
@property
def auto_id(self) -> str: ...
@property
def id_for_label(self): ...
def initial(self) -> Any: ...
def build_widget_attrs(self, attrs: Dict[str, str], widget: Optional[Widget] = ...) -> Dict[str, Union[bool, str]]: ...
class BoundWidget:
def __init__(
self,
parent_widget: ChoiceWidget,
data: Dict[str, Any],
renderer: DjangoTemplates
) -> None: ...
@property
def choice_label(self) -> str: ...
parent_widget: Any = ...
data: Any = ...
renderer: Any = ...
def __init__(self, parent_widget: ChoiceWidget, data: Dict[str, Any], renderer: DjangoTemplates) -> None: ...
def __str__(self): ...
def tag(self, wrap_label: bool = ...) -> SafeText: ...
@property
def template_name(self) -> str: ...
def template_name(self) -> str: ...
@property
def id_for_label(self): ...
@property
def choice_label(self) -> str: ...
+199 -225
View File
@@ -1,261 +1,235 @@
from datetime import (
date,
datetime,
time,
timedelta,
)
# Stubs for django.forms.fields (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any, Optional
from datetime import date, datetime, time, timedelta
from decimal import Decimal
from django.core.files.uploadedfile import SimpleUploadedFile
from django.db.models.fields.files import FieldFile
from django.forms.boundfield import BoundField
from django.forms.forms import Form
from django.forms.models import ModelForm
from django.forms.widgets import (
ClearableFileInput,
Input,
Textarea,
Widget,
)
from typing import (
Any,
Callable,
Dict,
List,
Optional,
Tuple,
Union,
)
from django.forms.widgets import ClearableFileInput, Input, Textarea, Widget
from typing import Any, Callable, Dict, List, Optional, Tuple, Union
class Field:
widget: Any = ...
hidden_widget: Any = ...
default_validators: Any = ...
default_error_messages: Any = ...
empty_values: Any = ...
show_hidden_initial: Any = ...
help_text: Any = ...
disabled: Any = ...
label_suffix: Any = ...
localize: Any = ...
error_messages: Any = ...
validators: Any = ...
def __init__(self, *, required: bool = ..., widget: Optional[Any] = ..., label: Optional[Any] = ..., initial: Optional[Any] = ..., help_text: str = ..., error_messages: Optional[Any] = ..., show_hidden_initial: bool = ..., validators: Any = ..., localize: bool = ..., disabled: bool = ..., label_suffix: Optional[Any] = ...) -> None: ...
def prepare_value(self, value: Any) -> Any: ...
def to_python(self, value: Any) -> Any: ...
def validate(self, value: Any) -> None: ...
def run_validators(self, value: Any) -> None: ...
def clean(self, value: Any) -> Any: ...
def bound_data(self, data: Any, initial: Optional[Union[str, float, datetime]]) -> Any: ...
def widget_attrs(self, widget: Widget) -> Dict[Any, Any]: ...
def has_changed(self, initial: Any, data: Optional[str]) -> bool: ...
def get_bound_field(self, form: Union[Form, ModelForm], field_name: str) -> BoundField: ...
def __deepcopy__(self, memo: Dict[int, Any]) -> Field: ...
class BaseTemporalField:
def __init__(self, *, input_formats = ..., **kwargs) -> None: ...
def to_python(self, value: str) -> Union[date, time]: ...
class BooleanField:
def has_changed(self, initial: Optional[bool], data: Optional[Union[bool, str]]) -> bool: ...
def to_python(self, value: Optional[Union[str, int]]) -> bool: ...
def validate(self, value: bool) -> None: ...
class CallableChoiceIterator:
def __init__(self, choices_func: Callable) -> None: ...
def __iter__(self) -> None: ...
class CharField:
def __init__(
self,
*,
max_length = ...,
min_length = ...,
strip = ...,
empty_value = ...,
**kwargs
) -> None: ...
class CharField(Field):
max_length: Any = ...
min_length: Any = ...
strip: Any = ...
empty_value: Any = ...
def __init__(self, *, max_length: Optional[Any] = ..., min_length: Optional[Any] = ..., strip: bool = ..., empty_value: str = ..., **kwargs: Any) -> None: ...
def to_python(self, value: Optional[Union[int, str, Tuple]]) -> Optional[str]: ...
def widget_attrs(self, widget: Union[Textarea, Input]) -> Dict[str, str]: ...
class IntegerField(Field):
widget: Any = ...
default_error_messages: Any = ...
re_decimal: Any = ...
def __init__(self, *, max_value: Optional[Any] = ..., min_value: Optional[Any] = ..., **kwargs: Any) -> None: ...
def to_python(self, value: Optional[Union[str, float]]) -> Optional[int]: ...
def widget_attrs(self, widget: Input) -> Dict[str, Union[int, Decimal]]: ...
class ChoiceField:
def __deepcopy__(self, memo: Dict[int, Any]) -> ChoiceField: ...
def __init__(self, *, choices = ..., **kwargs) -> None: ...
def _get_choices(self) -> Any: ...
def _set_choices(self, value: Any) -> None: ...
def to_python(self, value: Optional[str]) -> str: ...
def valid_value(self, value: str) -> bool: ...
def validate(self, value: str) -> None: ...
class ComboField:
def __init__(self, fields: List[CharField], **kwargs) -> None: ...
def clean(self, value: Optional[str]) -> str: ...
class DateField:
def strptime(self, value: str, format: str) -> date: ...
def to_python(self, value: Optional[Union[date, str]]) -> Optional[date]: ...
class DateTimeField:
def prepare_value(self, value: Optional[datetime]) -> Optional[datetime]: ...
def strptime(self, value: str, format: str) -> datetime: ...
def to_python(self, value: Optional[Union[str, date]]) -> Optional[datetime]: ...
class DecimalField:
def __init__(
self,
*,
max_value = ...,
min_value = ...,
max_digits = ...,
decimal_places = ...,
**kwargs
) -> None: ...
def to_python(self, value: Optional[Union[str, float]]) -> Optional[Decimal]: ...
def validate(self, value: Decimal) -> None: ...
def widget_attrs(self, widget: Widget) -> Dict[str, str]: ...
class DurationField:
def prepare_value(self, value: Optional[timedelta]) -> Optional[str]: ...
def to_python(self, value: Union[str, int]) -> timedelta: ...
class EmailField:
def __init__(self, **kwargs) -> None: ...
class Field:
def __deepcopy__(self, memo: Dict[int, Any]) -> Field: ...
def __init__(
self,
*,
required = ...,
widget = ...,
label = ...,
initial = ...,
help_text = ...,
error_messages = ...,
show_hidden_initial = ...,
validators = ...,
localize = ...,
disabled = ...,
label_suffix = ...
) -> None: ...
def bound_data(self, data: Any, initial: Optional[Union[str, float, datetime]]) -> Any: ...
def clean(self, value: Any) -> Any: ...
def get_bound_field(
self,
form: Union[Form, ModelForm],
field_name: str
) -> BoundField: ...
def has_changed(self, initial: Any, data: Optional[str]) -> bool: ...
def prepare_value(self, value: Any) -> Any: ...
def run_validators(self, value: Any) -> None: ...
def to_python(self, value: Any) -> Any: ...
def validate(self, value: Any) -> None: ...
def widget_attrs(self, widget: Widget) -> Dict[Any, Any]: ...
class FileField:
def __init__(self, *, max_length = ..., allow_empty_file = ..., **kwargs) -> None: ...
def bound_data(
self,
data: Union[str, SimpleUploadedFile],
initial: None
) -> Union[str, SimpleUploadedFile]: ...
def clean(
self,
data: Optional[Union[bool, str, SimpleUploadedFile]],
initial: Optional[Union[str, FieldFile]] = ...
) -> Any: ...
def has_changed(self, initial: Union[str, FieldFile], data: Optional[str]) -> bool: ...
def to_python(
self,
data: Optional[Union[str, SimpleUploadedFile]]
) -> Optional[SimpleUploadedFile]: ...
class FilePathField:
def __init__(
self,
path: str,
*,
match = ...,
recursive = ...,
allow_files = ...,
allow_folders = ...,
**kwargs
) -> None: ...
class FloatField:
class FloatField(IntegerField):
default_error_messages: Any = ...
def to_python(self, value: str) -> Optional[float]: ...
def validate(self, value: Optional[float]) -> None: ...
def widget_attrs(self, widget: Input) -> Dict[str, Union[int, str]]: ...
class DecimalField(IntegerField):
default_error_messages: Any = ...
def __init__(self, *, max_value: Optional[Any] = ..., min_value: Optional[Any] = ..., max_digits: Optional[Any] = ..., decimal_places: Optional[Any] = ..., **kwargs: Any) -> None: ...
def to_python(self, value: Optional[Union[str, float]]) -> Optional[Decimal]: ...
def validate(self, value: Decimal) -> None: ...
def widget_attrs(self, widget: Widget) -> Dict[str, str]: ...
class GenericIPAddressField:
def __init__(self, *, protocol = ..., unpack_ipv4 = ..., **kwargs) -> None: ...
def to_python(self, value: str) -> str: ...
class BaseTemporalField(Field):
input_formats: Any = ...
def __init__(self, *, input_formats: Optional[Any] = ..., **kwargs: Any) -> None: ...
def to_python(self, value: str) -> Union[date, time]: ...
def strptime(self, value: Any, format: Any) -> None: ...
class DateField(BaseTemporalField):
widget: Any = ...
input_formats: Any = ...
default_error_messages: Any = ...
def to_python(self, value: Optional[Union[date, str]]) -> Optional[date]: ...
def strptime(self, value: str, format: str) -> date: ...
class ImageField:
class TimeField(BaseTemporalField):
widget: Any = ...
input_formats: Any = ...
default_error_messages: Any = ...
def to_python(self, value: Optional[Union[str, time]]) -> Optional[time]: ...
def strptime(self, value: str, format: str) -> time: ...
class DateTimeField(BaseTemporalField):
widget: Any = ...
input_formats: Any = ...
default_error_messages: Any = ...
def prepare_value(self, value: Optional[datetime]) -> Optional[datetime]: ...
def to_python(self, value: Optional[Union[str, date]]) -> Optional[datetime]: ...
def strptime(self, value: str, format: str) -> datetime: ...
class DurationField(Field):
default_error_messages: Any = ...
def prepare_value(self, value: Optional[timedelta]) -> Optional[str]: ...
def to_python(self, value: Union[str, int]) -> timedelta: ...
class RegexField(CharField):
def __init__(self, regex: str, **kwargs: Any) -> None: ...
def _get_regex(self): ...
_regex: Any = ...
_regex_validator: Any = ...
def _set_regex(self, regex: str) -> None: ...
regex: Any = ...
class EmailField(CharField):
widget: Any = ...
default_validators: Any = ...
def __init__(self, **kwargs: Any) -> None: ...
class FileField(Field):
widget: Any = ...
default_error_messages: Any = ...
max_length: Any = ...
allow_empty_file: Any = ...
def __init__(self, *, max_length: Optional[Any] = ..., allow_empty_file: bool = ..., **kwargs: Any) -> None: ...
def to_python(self, data: Optional[Union[str, SimpleUploadedFile]]) -> Optional[SimpleUploadedFile]: ...
def clean(self, data: Optional[Union[bool, str, SimpleUploadedFile]], initial: Optional[Union[str, FieldFile]] = ...) -> Any: ...
def bound_data(self, data: Union[str, SimpleUploadedFile], initial: None) -> Union[str, SimpleUploadedFile]: ...
def has_changed(self, initial: Union[str, FieldFile], data: Optional[str]) -> bool: ...
class ImageField(FileField):
default_validators: Any = ...
default_error_messages: Any = ...
def to_python(self, data: Any): ...
def widget_attrs(self, widget: ClearableFileInput) -> Dict[str, str]: ...
class URLField(CharField):
widget: Any = ...
default_error_messages: Any = ...
default_validators: Any = ...
def __init__(self, **kwargs: Any) -> None: ...
def to_python(self, value: Optional[Union[str, int]]) -> Optional[str]: ...
class IntegerField:
def __init__(self, *, max_value = ..., min_value = ..., **kwargs) -> None: ...
def to_python(self, value: Optional[Union[str, float]]) -> Optional[int]: ...
def widget_attrs(self, widget: Input) -> Dict[str, Union[int, Decimal]]: ...
class BooleanField(Field):
widget: Any = ...
def to_python(self, value: Optional[Union[str, int]]) -> bool: ...
def validate(self, value: bool) -> None: ...
def has_changed(self, initial: Optional[bool], data: Optional[Union[bool, str]]) -> bool: ...
class MultiValueField:
def __deepcopy__(self, memo: Dict[int, Any]) -> MultiValueField: ...
def __init__(
self,
fields: Union[Tuple[CharField, MultipleChoiceField, SplitDateTimeField], Tuple[DateField, TimeField], Tuple[CharField, CharField]],
*,
require_all_fields = ...,
**kwargs
) -> None: ...
def clean(
self,
value: Union[str, List[str], List[Union[str, List[str]]]]
) -> Optional[Union[str, datetime]]: ...
def has_changed(
self,
initial: Optional[Union[datetime, List[None], List[str]]],
data: Union[List[None], List[str]]
) -> bool: ...
def validate(self, value: Union[str, datetime]) -> None: ...
class MultipleChoiceField:
def has_changed(self, initial: Optional[Union[str, List[int]]], data: Union[str, List[str]]) -> bool: ...
def to_python(self, value: Optional[Union[str, List[str], Tuple]]) -> List[str]: ...
def validate(self, value: List[str]) -> None: ...
class NullBooleanField:
class NullBooleanField(BooleanField):
widget: Any = ...
def to_python(self, value: Optional[Union[str, bool]]) -> Optional[bool]: ...
def validate(self, value: Optional[bool]) -> None: ...
class CallableChoiceIterator:
choices_func: Any = ...
def __init__(self, choices_func: Callable) -> None: ...
def __iter__(self) -> None: ...
class RegexField:
def __init__(self, regex: str, **kwargs) -> None: ...
def _set_regex(self, regex: str) -> None: ...
class ChoiceField(Field):
widget: Any = ...
default_error_messages: Any = ...
choices: Any = ...
def __init__(self, *, choices: Any = ..., **kwargs: Any) -> None: ...
def __deepcopy__(self, memo: Dict[int, Any]) -> ChoiceField: ...
def _get_choices(self) -> Any: ...
_choices: Any = ...
def _set_choices(self, value: Any) -> None: ...
def to_python(self, value: Optional[str]) -> str: ...
def validate(self, value: str) -> None: ...
def valid_value(self, value: str) -> bool: ...
class SlugField:
def __init__(self, *, allow_unicode = ..., **kwargs) -> None: ...
class SplitDateTimeField:
def __init__(self, *, input_date_formats = ..., input_time_formats = ..., **kwargs) -> None: ...
def compress(self, data_list: List[Union[date, time]]) -> Optional[datetime]: ...
class TimeField:
def strptime(self, value: str, format: str) -> time: ...
def to_python(self, value: Optional[Union[str, time]]) -> Optional[time]: ...
class TypedChoiceField:
def __init__(self, *, coerce = ..., empty_value = ..., **kwargs) -> None: ...
class TypedChoiceField(ChoiceField):
coerce: Any = ...
empty_value: Any = ...
def __init__(self, *, coerce: Any = ..., empty_value: str = ..., **kwargs: Any) -> None: ...
def _coerce(self, value: Optional[Union[str, int]]) -> Optional[Union[str, int]]: ...
def clean(self, value: Optional[str]) -> Optional[Union[str, int]]: ...
class MultipleChoiceField(ChoiceField):
hidden_widget: Any = ...
widget: Any = ...
default_error_messages: Any = ...
def to_python(self, value: Optional[Union[str, List[str], Tuple]]) -> List[str]: ...
def validate(self, value: List[str]) -> None: ...
def has_changed(self, initial: Optional[Union[str, List[int]]], data: Union[str, List[str]]) -> bool: ...
class TypedMultipleChoiceField:
def __init__(self, *, coerce = ..., **kwargs) -> None: ...
class TypedMultipleChoiceField(MultipleChoiceField):
coerce: Any = ...
empty_value: Any = ...
def __init__(self, *, coerce: Any = ..., **kwargs: Any) -> None: ...
def _coerce(self, value: List[str]) -> Optional[Union[List[Decimal], List[int]]]: ...
def clean(self, value: List[str]) -> Optional[Union[List[int], List[bool]]]: ...
def validate(self, value: List[str]) -> None: ...
class ComboField(Field):
fields: Any = ...
def __init__(self, fields: List[CharField], **kwargs: Any) -> None: ...
def clean(self, value: Optional[str]) -> str: ...
class URLField:
def __init__(self, **kwargs) -> None: ...
def to_python(self, value: Optional[Union[str, int]]) -> Optional[str]: ...
class MultiValueField(Field):
default_error_messages: Any = ...
require_all_fields: Any = ...
fields: Any = ...
def __init__(self, fields: Union[Tuple[CharField, MultipleChoiceField, SplitDateTimeField], Tuple[DateField, TimeField], Tuple[CharField, CharField]], *, require_all_fields: bool = ..., **kwargs: Any) -> None: ...
def __deepcopy__(self, memo: Dict[int, Any]) -> MultiValueField: ...
def validate(self, value: Union[str, datetime]) -> None: ...
def clean(self, value: Union[str, List[str], List[Union[str, List[str]]]]) -> Optional[Union[str, datetime]]: ...
def compress(self, data_list: Any) -> None: ...
def has_changed(self, initial: Optional[Union[datetime, List[None], List[str]]], data: Union[List[None], List[str]]) -> bool: ...
class FilePathField(ChoiceField):
choices: Any = ...
match_re: Any = ...
def __init__(self, path: str, *, match: Optional[Any] = ..., recursive: bool = ..., allow_files: bool = ..., allow_folders: bool = ..., **kwargs: Any) -> None: ...
class SplitDateTimeField(MultiValueField):
widget: Any = ...
hidden_widget: Any = ...
default_error_messages: Any = ...
def __init__(self, *, input_date_formats: Optional[Any] = ..., input_time_formats: Optional[Any] = ..., **kwargs: Any) -> None: ...
def compress(self, data_list: List[Union[date, time]]) -> Optional[datetime]: ...
class GenericIPAddressField(CharField):
unpack_ipv4: Any = ...
default_validators: Any = ...
def __init__(self, *, protocol: str = ..., unpack_ipv4: bool = ..., **kwargs: Any) -> None: ...
def to_python(self, value: str) -> str: ...
class SlugField(CharField):
default_validators: Any = ...
allow_unicode: Any = ...
def __init__(self, *, allow_unicode: bool = ..., **kwargs: Any) -> None: ...
class UUIDField(CharField):
default_error_messages: Any = ...
def prepare_value(self, value: Any): ...
def to_python(self, value: Any): ...
+60 -51
View File
@@ -1,61 +1,70 @@
# Stubs for django.forms.forms (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from django.forms.widgets import MediaDefiningClass
from typing import Any, Optional
from django.core.exceptions import ValidationError
from django.core.files.uploadedfile import SimpleUploadedFile
from django.forms.boundfield import BoundField
from django.forms.utils import (
ErrorDict,
ErrorList,
)
from django.forms.utils import ErrorDict, ErrorList
from django.utils.datastructures import MultiValueDict
from django.utils.safestring import SafeText
from typing import (
Any,
Dict,
Iterator,
List,
Optional,
Type,
Union,
)
from typing import Any, Dict, Iterator, List, Optional, Type, Union
class DeclarativeFieldsMetaclass(MediaDefiningClass):
def __new__(mcs: Any, name: Any, bases: Any, attrs: Any): ...
@classmethod
def __prepare__(metacls: Any, name: Any, bases: Any, **kwds: Any): ...
class BaseForm:
def __getitem__(self, name: str) -> BoundField: ...
def __init__(
self,
data: Any = ...,
files: Optional[Union[MultiValueDict, Dict[str, SimpleUploadedFile]]] = ...,
auto_id: Optional[Union[str, bool]] = ...,
prefix: Optional[str] = ...,
initial: Any = ...,
error_class: Type[ErrorList] = ...,
label_suffix: None = ...,
empty_permitted: bool = ...,
field_order: None = ...,
use_required_attribute: Optional[bool] = ...,
renderer: object = ...
) -> None: ...
def __iter__(self) -> Iterator[BoundField]: ...
default_renderer: Any = ...
field_order: Any = ...
prefix: Any = ...
use_required_attribute: bool = ...
is_bound: Any = ...
data: Any = ...
files: Any = ...
auto_id: Any = ...
initial: Any = ...
error_class: Any = ...
label_suffix: Any = ...
empty_permitted: Any = ...
_errors: Any = ...
fields: Any = ...
_bound_fields_cache: Any = ...
renderer: Any = ...
def __init__(self, data: Any = ..., files: Optional[Union[MultiValueDict, Dict[str, SimpleUploadedFile]]] = ..., auto_id: Optional[Union[str, bool]] = ..., prefix: Optional[str] = ..., initial: Any = ..., error_class: Type[ErrorList] = ..., label_suffix: None = ..., empty_permitted: bool = ..., field_order: None = ..., use_required_attribute: Optional[bool] = ..., renderer: object = ...) -> None: ...
def order_fields(self, field_order: Any): ...
def __str__(self): ...
def __repr__(self) -> str: ...
def _clean_fields(self) -> None: ...
def _clean_form(self) -> None: ...
def _html_output(
self,
normal_row: str,
error_row: str,
row_ender: str,
help_text_html: str,
errors_on_separate_row: bool
) -> SafeText: ...
def _post_clean(self) -> None: ...
def add_error(self, field: Optional[str], error: Union[str, ValidationError]) -> None: ...
def add_initial_prefix(self, field_name: str) -> str: ...
def add_prefix(self, field_name: str) -> str: ...
def as_p(self) -> SafeText: ...
def as_table(self) -> SafeText: ...
def as_ul(self) -> SafeText: ...
@cached_property
def changed_data(self) -> List[str]: ...
def clean(self) -> Dict[str, Any]: ...
def __iter__(self) -> Iterator[BoundField]: ...
def __getitem__(self, name: str) -> BoundField: ...
@property
def errors(self) -> ErrorDict: ...
def full_clean(self) -> None: ...
def is_valid(self): ...
def add_prefix(self, field_name: str) -> str: ...
def add_initial_prefix(self, field_name: str) -> str: ...
def _html_output(self, normal_row: str, error_row: str, row_ender: str, help_text_html: str, errors_on_separate_row: bool) -> SafeText: ...
def as_table(self) -> SafeText: ...
def as_ul(self) -> SafeText: ...
def as_p(self) -> SafeText: ...
def non_field_errors(self): ...
def add_error(self, field: Optional[str], error: Union[str, ValidationError]) -> None: ...
def has_error(self, field: Any, code: Optional[Any] = ...): ...
cleaned_data: Any = ...
def full_clean(self) -> None: ...
def _clean_fields(self) -> None: ...
def _clean_form(self) -> None: ...
def _post_clean(self) -> None: ...
def clean(self) -> Dict[str, Any]: ...
def has_changed(self): ...
def changed_data(self) -> List[str]: ...
@property
def media(self): ...
def is_multipart(self): ...
def hidden_fields(self): ...
def visible_fields(self): ...
def get_initial_for_field(self, field: Any, field_name: Any): ...
class Form(BaseForm): ...
+19 -12
View File
@@ -1,21 +1,28 @@
from django.template.backends.django import (
DjangoTemplates,
Template,
)
from typing import (
Any,
Dict,
)
# Stubs for django.forms.renderers (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any, Optional
from django.template.backends.django import DjangoTemplates, Template
from typing import Any, Dict
ROOT: Any
def get_default_renderer() -> DjangoTemplates: ...
class BaseRenderer:
def get_template(self, template_name: Any) -> None: ...
def render(self, template_name: str, context: Dict[str, Any], request: None = ...) -> str: ...
class EngineMixin:
@cached_property
def get_template(self, template_name: str) -> Template: ...
def engine(self) -> DjangoTemplates: ...
def get_template(self, template_name: str) -> Template: ...
class DjangoTemplates(EngineMixin, BaseRenderer):
backend: Any = ...
class Jinja2(EngineMixin, BaseRenderer):
backend: Any = ...
class TemplatesSetting(BaseRenderer):
def get_template(self, template_name: Any): ...
+27 -40
View File
@@ -1,52 +1,39 @@
# Stubs for django.forms.utils (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from collections import UserList
from typing import Any, Optional
from datetime import datetime
from django.core.exceptions import ValidationError
from django.utils.safestring import SafeText
from typing import (
Callable,
Dict,
List,
Optional,
Tuple,
Type,
Union,
)
from typing import Callable, Dict, List, Optional, Tuple, Type, Union
def pretty_name(name: str) -> str: ...
def flatatt(attrs: Dict[str, Optional[str]]) -> SafeText: ...
def from_current_timezone(value: datetime) -> datetime: ...
def pretty_name(name: str) -> str: ...
def to_current_timezone(value: datetime) -> datetime: ...
class ErrorDict:
class ErrorDict(dict):
def as_data(self) -> Dict[str, List[ValidationError]]: ...
def get_json_data(self, escape_html: bool = ...) -> Dict[str, List[Dict[str, str]]]: ...
def as_json(self, escape_html: bool = ...) -> str: ...
def as_ul(self) -> SafeText: ...
def get_json_data(self, escape_html: bool = ...) -> Dict[str, List[Dict[str, str]]]: ...
def as_text(self): ...
def __str__(self): ...
class ErrorList:
class ErrorList(UserList, list):
error_class: str = ...
def __init__(self, initlist: Optional[Union[ErrorList, List[str], List[ValidationError]]] = ..., error_class: Optional[str] = ...) -> None: ...
def as_data(self) -> List[ValidationError]: ...
def get_json_data(self, escape_html: bool = ...) -> List[Dict[str, str]]: ...
def as_json(self, escape_html: bool = ...): ...
def as_ul(self) -> str: ...
def as_text(self) -> str: ...
def __str__(self): ...
def __repr__(self) -> str: ...
def __contains__(self, item: str) -> bool: ...
def __eq__(self, other: Union[ErrorList, List[str]]) -> bool: ...
def __getitem__(self, i: Union[str, int]) -> str: ...
def __init__(
self,
initlist: Optional[Union[ErrorList, List[str], List[ValidationError]]] = ...,
error_class: Optional[str] = ...
) -> None: ...
def __reduce_ex__(
self,
*args,
**kwargs
) -> Tuple[Callable, Tuple[Type[ErrorList]], Dict[str, Union[List[ValidationError], str]], None, None]: ...
def __repr__(self) -> str: ...
def as_data(self) -> List[ValidationError]: ...
def as_text(self) -> str: ...
def as_ul(self) -> str: ...
def get_json_data(self, escape_html: bool = ...) -> List[Dict[str, str]]: ...
def __reduce_ex__(self, *args: Any, **kwargs: Any) -> Tuple[Callable, Tuple[Type[ErrorList]], Dict[str, Union[List[ValidationError], str]], None, None]: ...
def from_current_timezone(value: datetime) -> datetime: ...
def to_current_timezone(value: datetime) -> datetime: ...
+214 -270
View File
@@ -1,8 +1,10 @@
from datetime import (
date,
datetime,
time,
)
# Stubs for django.forms.widgets (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any, Optional
from datetime import date, datetime, time
from django.core.files.uploadedfile import SimpleUploadedFile
from django.db.models.fields.files import FieldFile
from django.forms.renderers import DjangoTemplates
@@ -10,303 +12,245 @@ from django.http.request import QueryDict
from django.utils.datastructures import MultiValueDict
from django.utils.safestring import SafeText
from itertools import chain
from typing import (
Any,
Callable,
Dict,
Iterator,
List,
Optional,
Set,
Tuple,
Type,
Union,
)
from typing import Any, Callable, Dict, Iterator, List, Optional, Set, Tuple, Type, Union
class MediaOrderConflictWarning(RuntimeWarning): ...
class Media:
_css: Any = ...
_js: Any = ...
def __init__(self, media: Optional[Type[object]] = ..., css: Optional[Union[Dict[str, Tuple[str, str]], Dict[str, List[str]], Dict[str, Tuple[str]]]] = ..., js: Any = ...) -> None: ...
def __repr__(self) -> str: ...
def __str__(self): ...
def render(self) -> SafeText: ...
def render_js(self) -> List[SafeText]: ...
def render_css(self) -> chain: ...
def absolute_path(self, path: str) -> str: ...
def __getitem__(self, name: str) -> Media: ...
@staticmethod
def merge(list_1: Union[List[int], List[str], Tuple[str]], list_2: Any) -> Union[List[int], List[str]]: ...
def __add__(self, other: Media) -> Media: ...
class CheckboxInput:
def __init__(self, attrs: Optional[Dict[str, str]] = ..., check_test: Optional[Callable] = ...) -> None: ...
def format_value(self, value: Optional[Union[str, int]]) -> Optional[str]: ...
def get_context(
self,
name: str,
value: Optional[Union[int, str]],
attrs: Optional[Union[Dict[str, Union[bool, str]], Dict[str, bool], Dict[str, str]]]
) -> Dict[str, Dict[str, Any]]: ...
def value_from_datadict(
self,
data: Any,
files: Union[MultiValueDict, Dict[str, SimpleUploadedFile]],
name: str
) -> bool: ...
def value_omitted_from_data(
self,
data: Union[Dict[str, Union[str, List[int]]], Dict[str, str], Dict[str, Union[int, str, None, datetime]], QueryDict],
files: MultiValueDict,
name: str
) -> bool: ...
class MediaDefiningClass(type):
def __new__(mcs: Type[MediaDefiningClass], name: str, bases: Tuple, attrs: Any) -> Type[Any]: ...
class Widget:
needs_multipart_form: bool = ...
is_localized: bool = ...
is_required: bool = ...
supports_microseconds: bool = ...
attrs: Any = ...
def __init__(self, attrs: Any = ...) -> None: ...
def __deepcopy__(self, memo: Dict[int, Any]) -> Widget: ...
@property
def is_hidden(self): ...
def subwidgets(self, name: Any, value: Any, attrs: Optional[Any] = ...) -> None: ...
def format_value(self, value: Any) -> Optional[str]: ...
def get_context(self, name: str, value: Any, attrs: Optional[Union[Dict[str, Union[bool, str]], Dict[str, bool], Dict[str, str]]]) -> Dict[str, Dict[str, Any]]: ...
def render(self, name: Any, value: Any, attrs: Optional[Any] = ..., renderer: Optional[Any] = ...): ...
def _render(self, template_name: str, context: Dict[str, Any], renderer: Optional[DjangoTemplates] = ...) -> SafeText: ...
def build_attrs(self, base_attrs: Dict[str, Union[float, str]], extra_attrs: Optional[Union[Dict[str, Union[bool, str]], Dict[str, bool], Dict[str, str]]] = ...) -> Dict[str, Union[float, str]]: ...
def value_from_datadict(self, data: Any, files: Any, name: Any): ...
def value_omitted_from_data(self, data: Any, files: Any, name: Any): ...
def id_for_label(self, id_: Any): ...
def use_required_attribute(self, initial: Any): ...
class CheckboxSelectMultiple:
def id_for_label(self, id_: str, index: Optional[str] = ...) -> str: ...
def use_required_attribute(self, initial: None) -> bool: ...
def value_omitted_from_data(self, data: Dict[Any, Any], files: Dict[Any, Any], name: str) -> bool: ...
class Input(Widget):
input_type: Any = ...
template_name: str = ...
def __init__(self, attrs: Optional[Union[Dict[str, int], Dict[str, str], Dict[str, bool]]] = ...) -> None: ...
def get_context(self, name: str, value: Any, attrs: Optional[Union[Dict[str, Union[bool, str]], Dict[str, bool], Dict[str, str]]]) -> Dict[str, Dict[str, Any]]: ...
class TextInput(Input):
input_type: str = ...
template_name: str = ...
class ChoiceWidget:
def __deepcopy__(self, memo: Dict[int, Any]) -> ChoiceWidget: ...
def __init__(
self,
attrs: Optional[Union[Dict[str, Union[bool, str]], Dict[str, str]]] = ...,
choices: Any = ...
) -> None: ...
def create_option(
self,
name: str,
value: Union[str, time, int],
label: Union[str, int],
selected: Union[bool, Set[str]],
index: int,
subindex: Optional[int] = ...,
attrs: Optional[Union[Dict[str, Union[bool, str]], Dict[str, bool], Dict[str, str]]] = ...
) -> Dict[str, Any]: ...
def format_value(self, value: Any) -> List[str]: ...
def get_context(
self,
name: str,
value: Any,
attrs: Optional[Union[Dict[str, Union[bool, str]], Dict[str, bool], Dict[str, str]]]
) -> Dict[str, Dict[str, Any]]: ...
def id_for_label(self, id_: str, index: str = ...) -> str: ...
def optgroups(
self,
name: str,
value: List[str],
attrs: Optional[Union[Dict[str, Union[bool, str]], Dict[str, bool], Dict[str, str]]] = ...
) -> Any: ...
def options(self, name: str, value: List[str], attrs: Dict[str, Union[bool, str]] = ...) -> None: ...
def subwidgets(self, name: str, value: Optional[List[str]], attrs: Dict[str, Union[bool, str]] = ...) -> None: ...
def value_from_datadict(
self,
data: dict,
files: MultiValueDict,
name: str
) -> Optional[Union[str, List[str], int]]: ...
class NumberInput(Input):
input_type: str = ...
template_name: str = ...
class EmailInput(Input):
input_type: str = ...
template_name: str = ...
class ClearableFileInput:
def clear_checkbox_id(self, name: str) -> str: ...
class URLInput(Input):
input_type: str = ...
template_name: str = ...
class PasswordInput(Input):
input_type: str = ...
template_name: str = ...
render_value: Any = ...
def __init__(self, attrs: Optional[Dict[str, bool]] = ..., render_value: bool = ...) -> None: ...
def get_context(self, name: str, value: Optional[str], attrs: Optional[Union[Dict[str, Union[str, bool]], Dict[str, bool]]]) -> Dict[str, Dict[str, Any]]: ...
class HiddenInput(Input):
input_type: str = ...
template_name: str = ...
class MultipleHiddenInput(HiddenInput):
template_name: str = ...
def get_context(self, name: str, value: List[str], attrs: Optional[Dict[str, str]]) -> Dict[str, Dict[str, Any]]: ...
def value_from_datadict(self, data: MultiValueDict, files: Dict[Any, Any], name: str) -> List[str]: ...
def format_value(self, value: Union[List[int], List[str]]) -> Union[List[int], List[str]]: ...
class FileInput(Input):
input_type: str = ...
needs_multipart_form: bool = ...
template_name: str = ...
def format_value(self, value: None) -> None: ...
def value_from_datadict(self, data: Union[Dict[str, str], Dict[str, bool], QueryDict], files: Dict[str, SimpleUploadedFile], name: str) -> Optional[SimpleUploadedFile]: ...
def value_omitted_from_data(self, data: Dict[Any, Any], files: Dict[str, Union[SimpleUploadedFile, str]], name: str) -> bool: ...
class ClearableFileInput(FileInput):
clear_checkbox_label: Any = ...
initial_text: Any = ...
input_text: Any = ...
template_name: str = ...
def clear_checkbox_name(self, name: str) -> str: ...
def format_value(
self,
value: Optional[Union[str, FieldFile]]
) -> Optional[FieldFile]: ...
def clear_checkbox_id(self, name: str) -> str: ...
def is_initial(self, value: object) -> bool: ...
def format_value(self, value: Optional[Union[str, FieldFile]]) -> Optional[FieldFile]: ...
def get_context(self, name: Any, value: Any, attrs: Any): ...
def value_from_datadict(self, data: Union[Dict[str, bool], Dict[str, None], Dict[str, str], QueryDict], files: Dict[str, Union[SimpleUploadedFile, str]], name: str) -> Optional[Union[str, SimpleUploadedFile]]: ...
def use_required_attribute(self, initial: Optional[FieldFile]) -> bool: ...
def value_from_datadict(
self,
data: Union[Dict[str, bool], Dict[str, None], Dict[str, str], QueryDict],
files: Dict[str, Union[SimpleUploadedFile, str]],
name: str
) -> Optional[Union[str, SimpleUploadedFile]]: ...
def value_omitted_from_data(self, data: Dict[str, str], files: Dict[Any, Any], name: str) -> bool: ...
class Textarea(Widget):
template_name: str = ...
def __init__(self, attrs: Optional[Union[Dict[str, int], Dict[str, str]]] = ...) -> None: ...
class DateTimeBaseInput:
class DateTimeBaseInput(TextInput):
format_key: str = ...
supports_microseconds: bool = ...
format: Any = ...
def __init__(self, attrs: Optional[Dict[str, str]] = ..., format: Optional[str] = ...) -> None: ...
def format_value(self, value: Optional[Union[time, str, date]]) -> Optional[str]: ...
class DateInput(DateTimeBaseInput):
format_key: str = ...
template_name: str = ...
class FileInput:
def format_value(self, value: None) -> None: ...
def value_from_datadict(
self,
data: Union[Dict[str, str], Dict[str, bool], QueryDict],
files: Dict[str, SimpleUploadedFile],
name: str
) -> Optional[SimpleUploadedFile]: ...
def value_omitted_from_data(
self,
data: Dict[Any, Any],
files: Dict[str, Union[SimpleUploadedFile, str]],
name: str
) -> bool: ...
class DateTimeInput(DateTimeBaseInput):
format_key: str = ...
template_name: str = ...
class TimeInput(DateTimeBaseInput):
format_key: str = ...
template_name: str = ...
class Input:
def __init__(self, attrs: Optional[Union[Dict[str, int], Dict[str, str], Dict[str, bool]]] = ...) -> None: ...
def get_context(
self,
name: str,
value: Any,
attrs: Optional[Union[Dict[str, Union[bool, str]], Dict[str, bool], Dict[str, str]]]
) -> Dict[str, Dict[str, Any]]: ...
class CheckboxInput(Input):
input_type: str = ...
template_name: str = ...
check_test: Any = ...
def __init__(self, attrs: Optional[Dict[str, str]] = ..., check_test: Optional[Callable] = ...) -> None: ...
def format_value(self, value: Optional[Union[str, int]]) -> Optional[str]: ...
def get_context(self, name: str, value: Optional[Union[int, str]], attrs: Optional[Union[Dict[str, Union[bool, str]], Dict[str, bool], Dict[str, str]]]) -> Dict[str, Dict[str, Any]]: ...
def value_from_datadict(self, data: Any, files: Union[MultiValueDict, Dict[str, SimpleUploadedFile]], name: str) -> bool: ...
def value_omitted_from_data(self, data: Union[Dict[str, Union[str, List[int]]], Dict[str, str], Dict[str, Union[int, str, None, datetime]], QueryDict], files: MultiValueDict, name: str) -> bool: ...
class ChoiceWidget(Widget):
allow_multiple_selected: bool = ...
input_type: Any = ...
template_name: Any = ...
option_template_name: Any = ...
add_id_index: bool = ...
checked_attribute: Any = ...
option_inherits_attrs: bool = ...
choices: Any = ...
def __init__(self, attrs: Optional[Union[Dict[str, Union[bool, str]], Dict[str, str]]] = ..., choices: Any = ...) -> None: ...
def __deepcopy__(self, memo: Dict[int, Any]) -> ChoiceWidget: ...
def subwidgets(self, name: str, value: Optional[List[str]], attrs: Dict[str, Union[bool, str]] = ...) -> None: ...
def options(self, name: str, value: List[str], attrs: Dict[str, Union[bool, str]] = ...) -> None: ...
def optgroups(self, name: str, value: List[str], attrs: Optional[Union[Dict[str, Union[bool, str]], Dict[str, bool], Dict[str, str]]] = ...) -> Any: ...
def create_option(self, name: str, value: Union[str, time, int], label: Union[str, int], selected: Union[bool, Set[str]], index: int, subindex: Optional[int] = ..., attrs: Optional[Union[Dict[str, Union[bool, str]], Dict[str, bool], Dict[str, str]]] = ...) -> Dict[str, Any]: ...
def get_context(self, name: str, value: Any, attrs: Optional[Union[Dict[str, Union[bool, str]], Dict[str, bool], Dict[str, str]]]) -> Dict[str, Dict[str, Any]]: ...
def id_for_label(self, id_: str, index: str = ...) -> str: ...
def value_from_datadict(self, data: dict, files: MultiValueDict, name: str) -> Optional[Union[str, List[str], int]]: ...
def format_value(self, value: Any) -> List[str]: ...
class Media:
def __add__(self, other: Media) -> Media: ...
def __getitem__(self, name: str) -> Media: ...
def __init__(
self,
media: Optional[Type[object]] = ...,
css: Optional[Union[Dict[str, Tuple[str, str]], Dict[str, List[str]], Dict[str, Tuple[str]]]] = ...,
js: Any = ...
) -> None: ...
def __repr__(self) -> str: ...
def absolute_path(self, path: str) -> str: ...
class Select(ChoiceWidget):
input_type: str = ...
template_name: str = ...
option_template_name: str = ...
add_id_index: bool = ...
checked_attribute: Any = ...
option_inherits_attrs: bool = ...
def get_context(self, name: str, value: Any, attrs: Optional[Union[Dict[str, Union[str, bool]], Dict[str, bool], Dict[str, str]]]) -> Dict[str, Dict[str, Any]]: ...
@staticmethod
def merge(list_1: Union[List[int], List[str], Tuple[str]], list_2: Any) -> Union[List[int], List[str]]: ...
def render(self) -> SafeText: ...
def render_css(self) -> chain: ...
def render_js(self) -> List[SafeText]: ...
def _choice_has_empty_value(choice: Union[Tuple[None, str], Tuple[str, str]]) -> bool: ...
def use_required_attribute(self, initial: Any) -> bool: ...
class MediaDefiningClass:
@staticmethod
def __new__(mcs: Type[MediaDefiningClass], name: str, bases: Tuple, attrs: Any) -> Type[Any]: ...
class MultiWidget:
def __deepcopy__(self, memo: Dict[int, Any]) -> MultiWidget: ...
def __init__(self, widgets: Any, attrs: Optional[Dict[str, str]] = ...) -> None: ...
def _get_media(self) -> Media: ...
def get_context(
self,
name: str,
value: Optional[Union[str, datetime, List[str]]],
attrs: Optional[Union[Dict[str, Union[str, bool]], Dict[str, str]]]
) -> Dict[str, Dict[str, Any]]: ...
def id_for_label(self, id_: str) -> str: ...
@property
def is_hidden(self) -> bool: ...
@property
def needs_multipart_form(self) -> bool: ...
def value_from_datadict(
self,
data: Union[Dict[str, str], Dict[str, Union[str, List[str]]], QueryDict],
files: MultiValueDict,
name: str
) -> Union[List[None], List[str]]: ...
def value_omitted_from_data(
self,
data: Union[Dict[str, str], QueryDict],
files: MultiValueDict,
name: str
) -> bool: ...
class MultipleHiddenInput:
def format_value(self, value: Union[List[int], List[str]]) -> Union[List[int], List[str]]: ...
def get_context(self, name: str, value: List[str], attrs: Optional[Dict[str, str]]) -> Dict[str, Dict[str, Any]]: ...
def value_from_datadict(
self,
data: MultiValueDict,
files: Dict[Any, Any],
name: str
) -> List[str]: ...
class NullBooleanSelect:
class NullBooleanSelect(Select):
def __init__(self, attrs: None = ...) -> None: ...
def format_value(self, value: Optional[str]) -> str: ...
def value_from_datadict(self, data: Dict[str, Union[str, bool]], files: Dict[Any, Any], name: str) -> Optional[bool]: ...
class PasswordInput:
def __init__(self, attrs: Optional[Dict[str, bool]] = ..., render_value: bool = ...) -> None: ...
def get_context(
self,
name: str,
value: Optional[str],
attrs: Optional[Union[Dict[str, Union[str, bool]], Dict[str, bool]]]
) -> Dict[str, Dict[str, Any]]: ...
class Select:
@staticmethod
def _choice_has_empty_value(choice: Union[Tuple[None, str], Tuple[str, str]]) -> bool: ...
def get_context(
self,
name: str,
value: Any,
attrs: Optional[Union[Dict[str, Union[str, bool]], Dict[str, bool], Dict[str, str]]]
) -> Dict[str, Dict[str, Any]]: ...
def use_required_attribute(self, initial: Any) -> bool: ...
class SelectDateWidget:
def __init__(
self,
attrs: None = ...,
years: Optional[Union[range, Tuple[str]]] = ...,
months: None = ...,
empty_label: Optional[Tuple[str, str, str]] = ...
) -> None: ...
@staticmethod
def _parse_date_fmt() -> Iterator[str]: ...
def format_value(self, value: Optional[Union[str, date]]) -> Dict[str, Optional[Union[str, int]]]: ...
def value_from_datadict(self, data: Dict[str, str], files: Dict[Any, Any], name: str) -> Optional[str]: ...
def value_omitted_from_data(self, data: Dict[str, str], files: Dict[Any, Any], name: str) -> bool: ...
class SelectMultiple:
def value_from_datadict(
self,
data: Any,
files: MultiValueDict,
name: str
) -> Optional[Union[List[int], str, List[str]]]: ...
class SelectMultiple(Select):
allow_multiple_selected: bool = ...
def value_from_datadict(self, data: Any, files: MultiValueDict, name: str) -> Optional[Union[List[int], str, List[str]]]: ...
def value_omitted_from_data(self, data: Dict[Any, Any], files: Dict[Any, Any], name: str) -> bool: ...
class RadioSelect(ChoiceWidget):
input_type: str = ...
template_name: str = ...
option_template_name: str = ...
class SplitDateTimeWidget:
def __init__(
self,
attrs: Optional[Dict[str, str]] = ...,
date_format: None = ...,
time_format: None = ...,
date_attrs: Optional[Dict[str, str]] = ...,
time_attrs: Optional[Dict[str, str]] = ...
) -> None: ...
def decompress(
self,
value: Optional[datetime]
) -> Union[List[Union[date, time]], List[None]]: ...
class CheckboxSelectMultiple(ChoiceWidget):
allow_multiple_selected: bool = ...
input_type: str = ...
template_name: str = ...
option_template_name: str = ...
def use_required_attribute(self, initial: None) -> bool: ...
def value_omitted_from_data(self, data: Dict[Any, Any], files: Dict[Any, Any], name: str) -> bool: ...
def id_for_label(self, id_: str, index: Optional[str] = ...) -> str: ...
class MultiWidget(Widget):
template_name: str = ...
widgets: Any = ...
def __init__(self, widgets: Any, attrs: Optional[Dict[str, str]] = ...) -> None: ...
@property
def is_hidden(self) -> bool: ...
def get_context(self, name: str, value: Optional[Union[str, datetime, List[str]]], attrs: Optional[Union[Dict[str, Union[str, bool]], Dict[str, str]]]) -> Dict[str, Dict[str, Any]]: ...
def id_for_label(self, id_: str) -> str: ...
def value_from_datadict(self, data: Union[Dict[str, str], Dict[str, Union[str, List[str]]], QueryDict], files: MultiValueDict, name: str) -> Union[List[None], List[str]]: ...
def value_omitted_from_data(self, data: Union[Dict[str, str], QueryDict], files: MultiValueDict, name: str) -> bool: ...
def decompress(self, value: Any) -> None: ...
def _get_media(self) -> Media: ...
media: Any = ...
def __deepcopy__(self, memo: Dict[int, Any]) -> MultiWidget: ...
@property
def needs_multipart_form(self) -> bool: ...
class SplitHiddenDateTimeWidget:
def __init__(
self,
attrs: None = ...,
date_format: None = ...,
time_format: None = ...,
date_attrs: None = ...,
time_attrs: None = ...
) -> None: ...
class SplitDateTimeWidget(MultiWidget):
supports_microseconds: bool = ...
template_name: str = ...
def __init__(self, attrs: Optional[Dict[str, str]] = ..., date_format: None = ..., time_format: None = ..., date_attrs: Optional[Dict[str, str]] = ..., time_attrs: Optional[Dict[str, str]] = ...) -> None: ...
def decompress(self, value: Optional[datetime]) -> Union[List[Union[date, time]], List[None]]: ...
class SplitHiddenDateTimeWidget(SplitDateTimeWidget):
template_name: str = ...
def __init__(self, attrs: None = ..., date_format: None = ..., time_format: None = ..., date_attrs: None = ..., time_attrs: None = ...) -> None: ...
class Textarea:
def __init__(self, attrs: Optional[Union[Dict[str, int], Dict[str, str]]] = ...) -> None: ...
class Widget:
def __deepcopy__(self, memo: Dict[int, Any]) -> Widget: ...
def __init__(self, attrs: Any = ...) -> None: ...
def _render(
self,
template_name: str,
context: Dict[str, Any],
renderer: Optional[DjangoTemplates] = ...
) -> SafeText: ...
def build_attrs(
self,
base_attrs: Dict[str, Union[float, str]],
extra_attrs: Optional[Union[Dict[str, Union[bool, str]], Dict[str, bool], Dict[str, str]]] = ...
) -> Dict[str, Union[float, str]]: ...
def format_value(self, value: Any) -> Optional[str]: ...
def get_context(
self,
name: str,
value: Any,
attrs: Optional[Union[Dict[str, Union[bool, str]], Dict[str, bool], Dict[str, str]]]
) -> Dict[str, Dict[str, Any]]: ...
class SelectDateWidget(Widget):
none_value: Any = ...
month_field: str = ...
day_field: str = ...
year_field: str = ...
template_name: str = ...
input_type: str = ...
select_widget: Any = ...
date_re: Any = ...
attrs: Any = ...
years: Any = ...
months: Any = ...
year_none_value: Any = ...
month_none_value: Any = ...
day_none_value: Any = ...
def __init__(self, attrs: None = ..., years: Optional[Union[range, Tuple[str]]] = ..., months: None = ..., empty_label: Optional[Tuple[str, str, str]] = ...) -> None: ...
def get_context(self, name: Any, value: Any, attrs: Any): ...
def format_value(self, value: Optional[Union[str, date]]) -> Dict[str, Optional[Union[str, int]]]: ...
@staticmethod
def _parse_date_fmt() -> Iterator[str]: ...
def id_for_label(self, id_: Any): ...
def value_from_datadict(self, data: Dict[str, str], files: Dict[Any, Any], name: str) -> Optional[str]: ...
def value_omitted_from_data(self, data: Dict[str, str], files: Dict[Any, Any], name: str) -> bool: ...